debian-build-0.10.1.1: Debian package build sequence tools

Copyright2014-2015 Kei Hibino
LicenseBSD3
Maintainerex8k.hibino@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Debian.Package.Build.Monad

Description

This module provides monad types to control build scripts.

Synopsis

Documentation

type Trace = ReaderT Bool IO Source #

Action type with trace flag

runTrace :: Trace a -> Bool -> IO a Source #

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 c Source #

bracket for Trace monad

bracketTrace_ :: Trace a -> Trace b -> Trace c -> Trace c Source #

bracket_ for Trace monad

type BaseDir = FilePath Source #

Type to specify base directory filepath

askBaseDir :: Build FilePath Source #

Get base directory in Build monad

askBuildDir :: Build FilePath Source #

Get build working directory in Build monad

data BuildDir Source #

Type to specify build working directory

Instances

Show BuildDir Source #

Show BuildDir is relative or absolute

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

data Config Source #

Build configuration type

Instances

defaultConfig :: (Config, Bool) Source #

Default configuration

buildDir :: Config -> BuildDir Source #

Specify build dir

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.

liftTrace :: Trace a -> Build a Source #

Lift from Trace monad into monad with Build configuration.

unBuild :: Build a -> BaseDir -> Config -> Trace a Source #

Unpack Build configuration monad into Trace.

runBuild :: Build a -> BaseDir -> Config -> Bool -> IO a Source #

Run Build configuration monad

askConfig :: Build Config Source #

Get build configuration in Build monad

bracketBuild :: Build a -> (a -> Build b) -> (a -> Build c) -> Build c Source #

bracket for Build monad

bracketBuild_ :: Build a -> Build b -> Build c -> Build c Source #

bracket_ for Build monad