purescript-0.15.15: PureScript Programming Language Compiler

Safe Haskell | None
Language | Haskell2010

Language.PureScript.Sugar.Names.Imports

Synopsis

- type ImportDef = (SourceSpan, ImportDeclarationType, Maybe ModuleName)
- resolveImports :: MonadError MultipleErrors m => Env -> Module -> m (Module, Imports)
- resolveModuleImport :: 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 :: MonadError MultipleErrors m => Env -> Module -> m (Module, Imports) #

Constructs a set of imports for a module.

resolveModuleImport :: 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.