hsdev- Haskell development library

Safe HaskellNone




List all packages

Scan cabal modules

listModules :: [String] -> PackageDbStack -> [ModulePackage] -> GhcM [ModuleLocation] Source #

List modules from ghc, accepts ghc-opts, stack of package-db to get modules for and list of packages to explicitely expose them with '-package' flag, otherwise hidden packages won't be loaded

browseModules :: [String] -> PackageDbStack -> [ModuleLocation] -> GhcM [InspectedModule] Source #

Like browseModules, but groups modules by package and inspects each package separately Trying to fix error: when there are several same packages (of different version), only Module from one of them can be lookuped and therefore modules from different version packages won't be actually inspected

browseModules' :: [String] -> [ModuleLocation] -> GhcM [InspectedModule] Source #

Inspect installed modules, doesn't set session and package flags!


uniqueModuleLocations :: [ModuleLocation] -> [ModuleLocation] Source #

There can be same modules (same package name, version and module name) installed in different locations Select first one of such modules

modulesPackages :: [ModuleLocation] -> [ModulePackage] Source #

Get modules packages

withEachPackage :: (ModulePackage -> [ModuleLocation] -> GhcM a) -> [ModuleLocation] -> GhcM [a] Source #

Run action for each package with prepared '-package' flags