Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data ModuleCollection = ModuleCollection {}
- data ModuleRecord
- = ModuleNotLoaded { }
- | ModuleParsed { }
- | ModuleRenamed { }
- | ModuleTypeChecked { }
- | ModuleCodeGenerated { }
- data ModuleCollectionId
- moduleCollectionIdString :: ModuleCollectionId -> String
- moduleCollectionPkgId :: ModuleCollectionId -> Maybe String
- mcSourceDirs :: Lens ModuleCollection ModuleCollection [FilePath] [FilePath]
- mcRoot :: Lens ModuleCollection ModuleCollection FilePath FilePath
- mcModules :: Lens ModuleCollection ModuleCollection (Map SourceFileKey ModuleRecord) (Map SourceFileKey ModuleRecord)
- mcId :: Lens ModuleCollection ModuleCollection ModuleCollectionId ModuleCollectionId
- mcFlagSetup :: Lens ModuleCollection ModuleCollection (DynFlags -> IO DynFlags) (DynFlags -> IO DynFlags)
- mcDependencies :: Lens ModuleCollection ModuleCollection [ModuleCollectionId] [ModuleCollectionId]
- typedRecModule :: Partial ModuleRecord ModuleRecord (UnnamedModule IdDom) (UnnamedModule IdDom)
- renamedRecModule :: Partial ModuleRecord ModuleRecord (UnnamedModule (Dom Name)) (UnnamedModule (Dom Name))
- recModuleWillNeedCode :: Partial ModuleRecord ModuleRecord Bool Bool
- parsedRecModule :: Partial ModuleRecord ModuleRecord (UnnamedModule (Dom RdrName)) (UnnamedModule (Dom RdrName))
- modRecMS :: Partial ModuleRecord ModuleRecord ModSummary ModSummary
- lookupModuleColl :: String -> [ModuleCollection] -> Maybe ModuleCollection
- lookupModInSCs :: SourceFileKey -> [ModuleCollection] -> Maybe (SourceFileKey, ModuleRecord)
- removeModule :: String -> [ModuleCollection] -> [ModuleCollection]
- hasGeneratedCode :: SourceFileKey -> [ModuleCollection] -> Bool
- needsGeneratedCode :: SourceFileKey -> [ModuleCollection] -> Bool
- codeGeneratedFor :: SourceFileKey -> [ModuleCollection] -> [ModuleCollection]
- isAlreadyLoaded :: SourceFileKey -> [ModuleCollection] -> Bool
- getAllModules :: [FilePath] -> IO [ModuleCollection]
- orderMCs :: [ModuleCollection] -> [ModuleCollection]
- getModules :: FilePath -> IO [ModuleCollection]
- modulesFromDirectory :: FilePath -> FilePath -> IO [String]
- srcDirFromRoot :: FilePath -> String -> FilePath
- modulesFromCabalFile :: FilePath -> FilePath -> IO [ModuleCollection]
- class ToModuleCollection t where
- compileInContext :: ModuleCollection -> [ModuleCollection] -> DynFlags -> IO DynFlags
- applyDependencies :: [ModuleCollection] -> [ModuleCollectionId] -> DynFlags -> DynFlags
- dependencyToPkgFlag :: [ModuleCollection] -> ModuleCollectionId -> Maybe PackageFlag
- enableAllPackages :: [ModuleCollection] -> DynFlags -> DynFlags
- flagsFromBuildInfo :: BuildInfo -> DynFlags -> IO DynFlags
Documentation
data ModuleCollection Source #
The modules of a library, executable, test or benchmark. A package contains one or more module collection.
ModuleCollection | |
|
data ModuleRecord Source #
data ModuleCollectionId Source #
This data structure identifies a module collection
mcModules :: Lens ModuleCollection ModuleCollection (Map SourceFileKey ModuleRecord) (Map SourceFileKey ModuleRecord) Source #
mcFlagSetup :: Lens ModuleCollection ModuleCollection (DynFlags -> IO DynFlags) (DynFlags -> IO DynFlags) Source #
mcDependencies :: Lens ModuleCollection ModuleCollection [ModuleCollectionId] [ModuleCollectionId] Source #
typedRecModule :: Partial ModuleRecord ModuleRecord (UnnamedModule IdDom) (UnnamedModule IdDom) Source #
renamedRecModule :: Partial ModuleRecord ModuleRecord (UnnamedModule (Dom Name)) (UnnamedModule (Dom Name)) Source #
parsedRecModule :: Partial ModuleRecord ModuleRecord (UnnamedModule (Dom RdrName)) (UnnamedModule (Dom RdrName)) Source #
lookupModuleColl :: String -> [ModuleCollection] -> Maybe ModuleCollection Source #
lookupModInSCs :: SourceFileKey -> [ModuleCollection] -> Maybe (SourceFileKey, ModuleRecord) Source #
removeModule :: String -> [ModuleCollection] -> [ModuleCollection] Source #
hasGeneratedCode :: SourceFileKey -> [ModuleCollection] -> Bool Source #
needsGeneratedCode :: SourceFileKey -> [ModuleCollection] -> Bool Source #
codeGeneratedFor :: SourceFileKey -> [ModuleCollection] -> [ModuleCollection] Source #
isAlreadyLoaded :: SourceFileKey -> [ModuleCollection] -> Bool Source #
getAllModules :: [FilePath] -> IO [ModuleCollection] Source #
Gets all ModuleCollections from a list of source directories. It also orders the source directories that are package roots so that they can be loaded in the order they are defined (no backward imports). This matters in those cases because for them there can be special compilation flags.
orderMCs :: [ModuleCollection] -> [ModuleCollection] Source #
Sorts model collection in an order to remove all backward references. Works because module collections defined by directories cannot be recursive.
getModules :: FilePath -> IO [ModuleCollection] Source #
Get modules of the project with the indicated root directory. If there is a cabal file, it uses that, otherwise it just scans the directory recursively for haskell sourcefiles. Only returns the non-boot haskell modules, the boot modules will be found during loading.
modulesFromCabalFile :: FilePath -> FilePath -> IO [ModuleCollection] Source #
class ToModuleCollection t where Source #
mkModuleCollKey :: PackageName -> t -> ModuleCollectionId Source #
getBuildInfo :: t -> BuildInfo Source #
getModuleNames :: t -> [ModuleName] Source #
compileInContext :: ModuleCollection -> [ModuleCollection] -> DynFlags -> IO DynFlags Source #
applyDependencies :: [ModuleCollection] -> [ModuleCollectionId] -> DynFlags -> DynFlags Source #
enableAllPackages :: [ModuleCollection] -> DynFlags -> DynFlags Source #