module-management-0.15: 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

getDirs :: m [FilePath]Source

Instances

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

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.

modulePathBase :: String -> ModuleName -> RelPathSource

Construct the base of a module path.