hsdev-0.3.3.6: Haskell development library

Safe HaskellNone
LanguageHaskell98

HsDev.Project

Contents

Synopsis

Documentation

infoSourceDirsDef :: Lens' Info [Path] Source #

infoSourceDirs lens with default

targetFiles :: Target t => t -> [Path] Source #

Get all source file names of target without prepending them with source-dirs

projectTargetFiles :: (MonadLog m, Target t) => Project -> t -> m [Path] Source #

Get all source file names relative to project root

readProject :: FilePath -> IO Project Source #

Read project info from .cabal

loadProject :: Project -> IO Project Source #

Load project description

withExtensions :: a -> Info -> Extensions a Source #

Extensions for target

fileInTarget :: Path -> Info -> Bool Source #

Check if source related to target, source must be relative to project directory

fileTarget :: Project -> Path -> Maybe Info Source #

Get first target for source file

fileTargets :: Project -> Path -> [Info] Source #

Get possible targets for source file There can be many candidates in case of module related to several executables or tests

findSourceDir :: Project -> Path -> Maybe (Extensions Path) Source #

Finds source dir file belongs to

sourceDirs :: ProjectDescription -> [Extensions Path] Source #

Returns source dirs for library, executables and tests

targetOpts :: Info -> [String] Source #

Get options for specific target

Helpers

showExtension :: Extension -> String Source #

Extension as flag name

flagExtension :: String -> Maybe String Source #

Convert -Xext to ext

extensionFlag :: String -> String Source #

Convert ext to -Xext

extensionsOpts :: Extensions a -> [String] Source #

Extensions as opts to GHC