Safe Haskell | None |
---|---|
Language | Haskell98 |
- data Project = Project {}
- data ProjectDescription = ProjectDescription {}
- class Target a where
- data Library = Library {
- libraryModules :: [[String]]
- libraryBuildInfo :: Info
- data Executable = Executable {}
- data Test = Test {
- testName :: String
- testEnabled :: Bool
- testBuildInfo :: Info
- data Info = Info {
- infoDepends :: [String]
- infoLanguage :: Maybe Language
- infoExtensions :: [Extension]
- infoSourceDirs :: [FilePath]
- readProject :: FilePath -> ErrorT String IO Project
- loadProject :: Project -> ErrorT String IO Project
- getProjectSandbox :: Project -> IO Cabal
- project :: FilePath -> Project
- data Extensions a = Extensions {
- extensions :: [Extension]
- entity :: a
- withExtensions :: a -> Info -> Extensions a
- infos :: ProjectDescription -> [Info]
- inTarget :: FilePath -> Info -> Bool
- fileTarget :: Project -> FilePath -> Maybe Info
- findSourceDir :: Project -> FilePath -> Maybe FilePath
- sourceDirs :: ProjectDescription -> [Extensions FilePath]
- showExtension :: Extension -> String
- flagExtension :: String -> Maybe String
- extensionFlag :: String -> String
- extensionsOpts :: [Extension] -> [String]
Documentation
Cabal project
data ProjectDescription Source
Library in project
Library | |
|
data Executable Source
Executable
Test
Test | |
|
Build info
Info | |
|
getProjectSandbox :: Project -> IO Cabal Source
Find project sandbox
data Extensions a Source
Entity with project extensions
Extensions | |
|
Functor Extensions | |
Applicative Extensions | |
Foldable Extensions | |
Traversable Extensions | |
Eq a => Eq (Extensions a) | |
Read a => Read (Extensions a) | |
Show a => Show (Extensions a) |
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
sourceDirs :: ProjectDescription -> [Extensions FilePath] Source
Returns source dirs for library, executables and tests
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 :: [Extension] -> [String] Source
Extensions as opts to GHC