Safe Haskell | None |
---|---|
Language | Haskell98 |
- newtype ResolveM a = ResolveM {
- runResolveM :: ReaderT Database (State ResolvedTree) a
- type ResolvedTree = Map ModuleId ResolvedModule
- data ResolvedModule = ResolvedModule {}
- scopeModule :: ResolvedModule -> Module
- exportsModule :: ResolvedModule -> Module
- resolvedTopScope :: ResolvedModule -> [Declaration]
- resolve :: (Traversable t, Foldable t) => Database -> t Module -> t ResolvedModule
- resolveOne :: Database -> Module -> ResolvedModule
- resolveModule :: Module -> ResolveM ResolvedModule
- exported :: [Declaration] -> Export -> [Declaration]
- resolveImport :: Module -> Import -> ResolveM [Declaration]
- mergeImported :: [Declaration] -> [Declaration]
Documentation
Resolve monad uses existing Database
and ResolvedTree
as state.
type ResolvedTree = Map ModuleId ResolvedModule Source
Tree of resolved modules
data ResolvedModule Source
Module with declarations bringed to scope and with exported declarations
scopeModule :: ResolvedModule -> Module Source
Make Module
with scope declarations
exportsModule :: ResolvedModule -> Module Source
Make Module
with exported only declarations
resolvedTopScope :: ResolvedModule -> [Declaration] Source
Get top-level scope
resolve :: (Traversable t, Foldable t) => Database -> t Module -> t ResolvedModule Source
Resolve modules, function is not IO, so all file names must be canonicalized
resolveOne :: Database -> Module -> ResolvedModule Source
Resolve one module
resolveModule :: Module -> ResolveM ResolvedModule Source
Resolve module
exported :: [Declaration] -> Export -> [Declaration] Source
Select declarations exported with Export
resolveImport :: Module -> Import -> ResolveM [Declaration] Source
Bring declarations into scope
mergeImported :: [Declaration] -> [Declaration] Source
Merge imported declarations