Safe Haskell | None |
---|---|
Language | Haskell98 |
- module HsDev.Project.Types
- infoSourceDirsDef :: Simple Lens Info [FilePath]
- readProject :: FilePath -> IO Project
- loadProject :: Project -> IO Project
- withExtensions :: a -> Info -> Extensions a
- infos :: ProjectDescription -> [Info]
- inTarget :: FilePath -> Info -> Bool
- fileTargets :: Project -> FilePath -> [Info]
- findSourceDir :: Project -> FilePath -> Maybe (Extensions FilePath)
- sourceDirs :: ProjectDescription -> [Extensions FilePath]
- targetOpts :: Info -> [String]
- showExtension :: Extension -> String
- flagExtension :: String -> Maybe String
- extensionFlag :: String -> String
- extensionsOpts :: Extensions a -> [String]
Documentation
module HsDev.Project.Types
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
infos :: ProjectDescription -> [Info] Source
Returns build targets infos
inTarget :: FilePath -> Info -> Bool Source
Check if source related to target, source must be relative to project directory
fileTargets :: Project -> FilePath -> [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 -> FilePath -> Maybe (Extensions FilePath) Source
Finds source dir file belongs to
sourceDirs :: ProjectDescription -> [Extensions FilePath] 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