Copyright | 2014-2015 Kei Hibino |
---|---|
License | BSD3 |
Maintainer | ex8k.hibino@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
This module provides monad types to control build scripts.
- type Trace = ReaderT Bool IO
- runTrace :: Trace a -> Bool -> IO a
- traceCommand :: String -> Trace ()
- traceOut :: String -> Trace ()
- putLog :: String -> Trace ()
- bracketTrace :: Trace a -> (a -> Trace b) -> (a -> Trace c) -> Trace c
- bracketTrace_ :: Trace a -> Trace b -> Trace c -> Trace c
- type BaseDir = FilePath
- askBaseDir :: Build FilePath
- askBuildDir :: Build FilePath
- data BuildDir
- buildDirRelative :: FilePath -> BuildDir
- buildDirAbsolute :: FilePath -> BuildDir
- data Config
- defaultConfig :: (Config, Bool)
- buildDir :: Config -> BuildDir
- debianDirName :: Config -> FilePath
- sourceExcludes :: Config -> [FilePath]
- type Build = ReaderT BaseDir (ReaderT Config Trace)
- liftTrace :: Trace a -> Build a
- unBuild :: Build a -> BaseDir -> Config -> Trace a
- runBuild :: Build a -> BaseDir -> Config -> Bool -> IO a
- askConfig :: Build Config
- bracketBuild :: Build a -> (a -> Build b) -> (a -> Build c) -> Build c
- bracketBuild_ :: Build a -> Build b -> Build c -> Build c
Documentation
traceCommand :: String -> Trace () Source #
Command string trace print along with trace flag
bracketTrace :: Trace a -> (a -> Trace b) -> (a -> Trace c) -> Trace c Source #
bracket for Trace
monad
Type to specify build working directory
buildDirRelative :: FilePath -> BuildDir Source #
Use relative path from base-dir as build workding directory
buildDirAbsolute :: FilePath -> BuildDir Source #
Use absolute path as build workding directory
defaultConfig :: (Config, Bool) Source #
Default configuration
debianDirName :: Config -> FilePath Source #
Name of debian directory
sourceExcludes :: Config -> [FilePath] Source #
Exclude directories to setup source directory
type Build = ReaderT BaseDir (ReaderT Config Trace) Source #
Monad type with build base directory and build configuration.