debian-build- Debian package build sequence tools

Safe HaskellSafe-Inferred



This module provides monad types to control build scripts.



type Trace = ReaderT Bool IOSource

Action type with trace flag

runTrace :: Trace a -> Bool -> IO aSource

Run Trace monad

traceCommand :: String -> Trace ()Source

Command string trace print along with trace flag

traceOut :: String -> Trace ()Source

Output string trace print along with trace flag

putLog :: String -> Trace ()Source

Put log stinrg with flush.

bracketTrace :: Trace a -> (a -> Trace b) -> (a -> Trace c) -> Trace cSource

bracket for Trace monad

bracketTrace_ :: Trace a -> Trace b -> Trace c -> Trace cSource

bracket_ for Trace monad

data BaseDir Source

Type to specify base directory filepath

baseDirCurrent :: BaseDirSource

Use current directory as base directory

baseDirSpecify :: FilePath -> BaseDirSource

Use specified directory as base directory

askBaseDir :: FilePath -> Build FilePathSource

Get base directory in Build monad

askBuildDir :: FilePath -> Build FilePathSource

Get build working directory in Build monad

data BuildDir Source

Type to specify build working directory


Show BuildDir

Show BuildDir is relative or absolute

buildDirRelative :: FilePath -> BuildDirSource

Use relative path from base-dir as build workding directory

buildDirAbsolute :: FilePath -> BuildDirSource

Use absolute path as build workding directory

data Config Source

Build configuration type


defaultConfig :: (Config, Bool)Source

Default configuration

buildDir :: Config -> BuildDirSource

Specify build dir

mayDebianDirName :: Config -> Maybe FilePathSource

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.

liftTrace :: Trace a -> Build aSource

Lift from Trace monad into monad with Build configuration.

runBuild :: Build a -> BaseDir -> Config -> Bool -> IO aSource

Run Build configuration monad

askConfig :: Build ConfigSource

Get build configuration in Build monad

bracketBuild :: Build a -> (a -> Build b) -> (a -> Build c) -> Build cSource

bracket for Build monad

bracketBuild_ :: Build a -> Build b -> Build c -> Build cSource

bracket_ for Build monad