haskell-tools-refactor-0.4.0.0: Refactoring Tool for Haskell

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.Refactor.GetModules

Synopsis

Documentation

data ModuleCollection Source #

The modules of a library, executable, test or benchmark. A package contains one or more module collection.

Constructors

ModuleCollection 

Fields

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.