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 {}
- data Info = Info {
- _infoDepends :: [String]
- _infoLanguage :: Maybe Language
- _infoExtensions :: [Extension]
- _infoGHCOptions :: [String]
- _infoSourceDirs :: [FilePath]
- infoSourceDirsDef :: Simple Lens Info [FilePath]
- readProject :: FilePath -> ExceptT String IO Project
- loadProject :: Project -> ExceptT String IO Project
- getProjectSandbox :: Project -> IO Cabal
- project :: FilePath -> Project
- data Extensions a = Extensions {
- _extensions :: [Extension]
- _ghcOptions :: [String]
- _entity :: a
- 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]
- projectName :: Lens' Project String
- projectPath :: Lens' Project FilePath
- projectCabal :: Lens' Project FilePath
- projectDescription :: Lens' Project (Maybe ProjectDescription)
- projectLibrary :: Lens' ProjectDescription (Maybe Library)
- projectExecutables :: Lens' ProjectDescription [Executable]
- projectTests :: Lens' ProjectDescription [Test]
- libraryModules :: Lens' Library [[String]]
- libraryBuildInfo :: Lens' Library Info
- executableName :: Lens' Executable String
- executablePath :: Lens' Executable FilePath
- executableBuildInfo :: Lens' Executable Info
- testName :: Lens' Test String
- testEnabled :: Lens' Test Bool
- testBuildInfo :: Lens' Test Info
- infoDepends :: Lens' Info [String]
- infoLanguage :: Lens' Info (Maybe Language)
- infoExtensions :: Lens' Info [Extension]
- infoGHCOptions :: Lens' Info [String]
- infoSourceDirs :: Lens' Info [FilePath]
- extensions :: forall a. Lens' (Extensions a) [Extension]
- ghcOptions :: forall a. Lens' (Extensions a) [String]
- entity :: forall a a. Lens (Extensions a) (Extensions a) a a
- showExtension :: Extension -> String
- flagExtension :: String -> Maybe String
- extensionFlag :: String -> String
- extensionsOpts :: Extensions a -> [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 Source | |
Applicative Extensions Source | |
Foldable Extensions Source | |
Traversable Extensions Source | |
Eq a => Eq (Extensions a) Source | |
Ord a => Ord (Extensions a) Source | |
Read a => Read (Extensions a) Source | |
Show a => Show (Extensions a) Source |
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
libraryModules :: Lens' Library [[String]] Source
infoDepends :: Lens' Info [String] Source
infoGHCOptions :: Lens' Info [String] Source
extensions :: forall a. Lens' (Extensions a) [Extension] Source
ghcOptions :: forall a. Lens' (Extensions a) [String] Source
entity :: forall a a. Lens (Extensions a) (Extensions a) a a Source
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