Safe Haskell | None |
---|---|
Language | Haskell98 |
- module HsDev.Project.Types
- infoSourceDirsDef :: Lens' Info [Path]
- targetFiles :: Target t => t -> [Path]
- projectTargetFiles :: (MonadLog m, Target t) => Project -> t -> m [Path]
- analyzeCabal :: String -> Either String ProjectDescription
- readProject :: FilePath -> IO Project
- loadProject :: Project -> IO Project
- withExtensions :: a -> Info -> Extensions a
- fileInTarget :: Path -> Info -> Bool
- fileTarget :: Project -> Path -> Maybe Info
- fileTargets :: Project -> Path -> [Info]
- findSourceDir :: Project -> Path -> Maybe (Extensions Path)
- sourceDirs :: ProjectDescription -> [Extensions Path]
- targetOpts :: Info -> [String]
- showExtension :: Extension -> String
- flagExtension :: String -> Maybe String
- extensionFlag :: String -> String
- extensionsOpts :: Extensions a -> [String]
Documentation
module HsDev.Project.Types
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
analyzeCabal :: String -> Either String ProjectDescription Source #
Analyze cabal file
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
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
extensionFlag :: String -> String Source #
Convert ext to -Xext
extensionsOpts :: Extensions a -> [String] Source #
Extensions as opts to GHC