hsdev-0.3.1.3: Haskell development library

Safe HaskellNone
LanguageHaskell98

HsDev.Scan.Browse

Contents

Synopsis

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!

Helpers

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