module-management-0.16.1: Clean up module imports, split and merge modules

Safe HaskellSafe-Inferred

Language.Haskell.Modules.SourceDirs

Synopsis

Documentation

class (MonadIO m, MonadBaseControl IO m) => SourceDirs m whereSource

Methods

putDirs :: [FilePath] -> m ()Source

Set the list of directories that will be searched for imported modules. Similar to the Hs-Source-Dirs field in the cabal file.

getDirs :: m [FilePath]Source

Instances

modifyDirs :: SourceDirs m => ([FilePath] -> [FilePath]) -> m ()Source

Modify the list of directories that will be searched for imported modules.

withDirs :: SourceDirs m => [FilePath] -> m a -> m aSource

newtype RelPath Source

A FilePath that is relative to the SourceDir list

Constructors

RelPath 

Fields

unRelPath :: FilePath
 

newtype PathKey Source

A FilePath that can be assumed to be unique.

Constructors

PathKey 

Fields

unPathKey :: FilePath
 

newtype APath Source

A regular filepath with a wrapper

Constructors

APath 

Fields

unAPath :: FilePath
 

pathKey :: (SourceDirs m, Path p, Show p) => p -> m PathKeySource

modulePath :: SourceDirs m => String -> ModuleName -> m APathSource

Search the path directory list, preferring an already existing file, but if there is none construct one using the first element of the directory list.