ddc-build- Disciplined Disciple Compiler build framework.

Safe HaskellNone




data Store Source #

Abstract API to a collection of module interfaces.

This lives in IO land because in future we want to demand-load the inferface files as needed, rather than loading the full dependency tree. Keeping it in IO means that callers must also be in IO.

new :: IO Store Source #

An empty interface store.

wrap :: Store -> InterfaceAA -> IO () Source #

Add a pre-loaded interface file to the store.

load :: FilePath -> IO (Either Error InterfaceAA) Source #

Load a new interface from a file.

data Meta Source #

Metadata for interfaces currently loaded into the store.


Show Meta Source # 


showsPrec :: Int -> Meta -> ShowS #

show :: Meta -> String #

showList :: [Meta] -> ShowS #

Pretty Meta Source # 

Associated Types

data PrettyMode Meta :: * #


pprDefaultMode :: PrettyMode Meta #

ppr :: Meta -> Doc #

pprPrec :: Int -> Meta -> Doc #

pprModePrec :: PrettyMode Meta -> Int -> Meta -> Doc #

getMeta :: Store -> IO [Meta] Source #

Get metadata of interfaces currently in the store.

getModuleNames :: Store -> IO [ModuleName] Source #

Get names of the modules currently in the store.

getInterfaces :: Store -> IO [InterfaceAA] Source #

Get the fully loaded interfaces.

data Super Source #

Interface for some top-level super.




findSuper Source #


:: Store 
-> Name

Name of desired super.

-> [ModuleName]

Names of modules to search.

-> IO [Super] 

See if a super is defined in any of the given modules, and if so return the module name and super type.

NOTE: This function returns an IO [Super] in preparation for the case where we load data from interface files on demand. We want to ensure that the caller is also in IO, to make the refactoring easier later.