purescript-0.15.12: PureScript Programming Language Compiler

Safe Haskell | Safe-Inferred
Language | Haskell2010

Language.PureScript.Sugar.Names.Imports

Synopsis

- type ImportDef = (SourceSpan, ImportDeclarationType, Maybe ModuleName)
- resolveImports :: forall m. MonadError MultipleErrors m => Env -> Module -> m (Module, Imports)
- resolveModuleImport :: forall m. MonadError MultipleErrors m => Env -> Imports -> (ModuleName, [(SourceSpan, Maybe ImportDeclarationType, Maybe ModuleName)]) -> m Imports
- findImports :: [Declaration] -> Map ModuleName [ImportDef]

# Documentation

type ImportDef = (SourceSpan, ImportDeclarationType, Maybe ModuleName) #

resolveImports :: forall m. MonadError MultipleErrors m => Env -> Module -> m (Module, Imports) #

Constructs a set of imports for a module.

resolveModuleImport :: forall m. MonadError MultipleErrors m => Env -> Imports -> (ModuleName, [(SourceSpan, Maybe ImportDeclarationType, Maybe ModuleName)]) -> m Imports #

Constructs a set of imports for a single module import.

findImports :: [Declaration] -> Map ModuleName [ImportDef] #

Finds the imports within a module, mapping the imported module name to an optional set of explicitly imported declarations.