Source codeContentsIndex
Distribution.Franchise
Synopsis
data C a
type FranchiseFlag = OptDescr (C ())
build :: [C (OptDescr (C ()))] -> C [String] -> IO ()
buildWithArgs :: [String] -> [C (OptDescr (C ()))] -> C [String] -> IO ()
buildTarget :: String -> C ()
executable :: String -> String -> [String] -> C [String]
privateExecutable :: String -> String -> [String] -> C [String]
installBin :: Dependency -> Maybe (C ())
addTarget :: Buildable -> C ()
replace :: Show a => String -> a -> C ()
replaceLiteral :: String -> String -> C ()
createFile :: String -> C ()
define :: String -> C ()
defineAs :: String -> String -> C ()
isDefined :: String -> C Bool
io :: IO a -> C a
catchC :: C a -> (String -> C a) -> C a
unlessC :: Monoid a => C Bool -> C a -> C a
whenC :: Monoid a => C Bool -> C a -> C a
csum :: [C a] -> C a
test :: [String] -> C ()
testC :: String -> C () -> C ()
testOne :: String -> String -> String -> C ()
testOutput :: String -> String -> C String -> C ()
beginTestWith :: C () -> C ()
prepareForTest :: C () -> C ()
addToRule :: String -> C () -> C ()
data Dependency = (:<) [String] [String]
data Buildable
(|<-) :: Dependency -> BuildRule -> Buildable
data BuildRule = BuildRule {
make :: (Dependency -> C ())
install :: (Dependency -> Maybe (C ()))
clean :: (Dependency -> [String])
}
defaultRule :: BuildRule
cacheifC :: String -> C Bool -> C () -> C () -> C ()
require :: String -> C () -> C ()
requireWithFeedback :: String -> C String -> C ()
requireWithPrereq :: String -> String -> C [String] -> C () -> C ()
setOnce :: String -> C () -> C ()
checkOnce :: String -> C () -> C ()
requireModule :: String -> C ()
lookForModule :: String -> C Bool
withModule :: String -> C () -> C ()
requireModuleExporting :: String -> String -> String -> C ()
lookForModuleExporting :: String -> String -> String -> C Bool
withModuleExporting :: String -> String -> String -> C () -> C ()
findProgram :: String -> [String] -> C String
withProgram :: Monoid a => String -> [String] -> (String -> C a) -> C a
configurableProgram :: String -> String -> [String] -> C FranchiseFlag
configuredProgram :: String -> C String
withConfiguredProgram :: String -> (String -> C a) -> C a
requireLib :: String -> String -> String -> C ()
lookForLib :: String -> String -> String -> C Bool
withLib :: String -> String -> String -> C () -> C ()
checkHeader :: String -> C ()
withHeader :: String -> C () -> C ()
findPackagesFor :: String -> C ()
withLibOutput :: String -> String -> String -> (String -> C ()) -> C ()
package :: String -> [String] -> [String] -> C [String]
copyright :: String -> C ()
license :: String -> C ()
version :: String -> C ()
addExtraData :: String -> String -> C ()
haveExtraData :: String -> C Bool
installPackageInto :: String -> String -> C ()
amInWindows :: C Bool
amLittleEndian :: C Bool
darcsDist :: String -> [String] -> C String
inDarcs :: C Bool
inGit :: C Bool
data ReleaseType
= Numbered
| NumberedPreRc
| AnyTag
autoVersion :: ReleaseType -> C String
autoPatchVersion :: ReleaseType -> C String
releaseDescription :: ReleaseType -> C String
releaseName :: ReleaseType -> C String
splitMarkdown :: String -> String -> C [String]
markdownToHtml :: String -> String -> String -> C [String]
markdownStringToHtmlString :: String -> String -> C String
autoHeader :: FilePath -> C ()
ghcFlags :: [String] -> C ()
ldFlags :: [String] -> C ()
cFlags :: [String] -> C ()
pkgFlags :: [String] -> C ()
rmGhcFlags :: [String] -> C ()
setOutputDirectory :: String -> C ()
system :: String -> [String] -> C ()
systemOut :: String -> [String] -> C String
systemInOut :: String -> [String] -> String -> C String
systemOutErrToFile :: String -> [String] -> String -> C ExitCode
cd :: String -> C ()
mkdir :: FilePath -> C ()
pwd :: C String
ls :: String -> C [String]
cat :: String -> C String
rm_rf :: FilePath -> C ()
mv :: String -> String -> C ()
mkFile :: FilePath -> String -> C ()
withDirectory :: String -> C a -> C a
rememberDirectory :: C (C a -> C a)
splitPath :: FilePath -> (FilePath, FilePath)
stripPrefix :: Eq a => [a] -> [a] -> Maybe [a]
setEnv :: String -> String -> C ()
getEnv :: String -> C (Maybe String)
addToPath :: FilePath -> C ()
addToGhcPath :: FilePath -> C ()
putS :: String -> C ()
putV :: String -> C ()
putSV :: String -> String -> C ()
splitFile :: String -> (String -> [(FilePath, String)]) -> C [FilePath]
mapDirectory :: (FilePath -> C a) -> FilePath -> C [a]
flag :: String -> String -> C () -> C FranchiseFlag
unlessFlag :: String -> String -> C () -> C FranchiseFlag
extraData :: String -> String
Documentation
data C aSource
show/hide Instances
Functor C
Monad C
type FranchiseFlag = OptDescr (C ())Source
build :: [C (OptDescr (C ()))] -> C [String] -> IO ()Source
buildWithArgs :: [String] -> [C (OptDescr (C ()))] -> C [String] -> IO ()Source
buildTarget :: String -> C ()Source
executable :: String -> String -> [String] -> C [String]Source
privateExecutable :: String -> String -> [String] -> C [String]Source
installBin :: Dependency -> Maybe (C ())Source
addTarget :: Buildable -> C ()Source
replace :: Show a => String -> a -> C ()Source
replaceLiteral :: String -> String -> C ()Source
createFile :: String -> C ()Source
define :: String -> C ()Source
defineAs :: String -> String -> C ()Source
isDefined :: String -> C BoolSource
io :: IO a -> C aSource
catchC :: C a -> (String -> C a) -> C aSource
unlessC :: Monoid a => C Bool -> C a -> C aSource
whenC :: Monoid a => C Bool -> C a -> C aSource
csum :: [C a] -> C aSource
csum is a variant of msum that preserves the last error output.
test :: [String] -> C ()Source
testC :: String -> C () -> C ()Source
Create a build target for test suites.
testOne :: String -> String -> String -> C ()Source
testOutput :: String -> String -> C String -> C ()Source
beginTestWith :: C () -> C ()Source
prepareForTest :: C () -> C ()Source
addToRule :: String -> C () -> C ()Source
data Dependency Source
Constructors
(:<) [String] [String]
data Buildable Source
show/hide Instances
(|<-) :: Dependency -> BuildRule -> BuildableSource
data BuildRule Source
Constructors
BuildRule
make :: (Dependency -> C ())
install :: (Dependency -> Maybe (C ()))
clean :: (Dependency -> [String])
defaultRule :: BuildRuleSource
cacheifC :: String -> C Bool -> C () -> C () -> C ()Source
require :: String -> C () -> C ()Source
requireWithFeedback :: String -> C String -> C ()Source
requireWithPrereq :: String -> String -> C [String] -> C () -> C ()Source
setOnce :: String -> C () -> C ()Source
checkOnce :: String -> C () -> C ()Source
requireModule :: String -> C ()Source
lookForModule :: String -> C BoolSource
withModule :: String -> C () -> C ()Source
requireModuleExporting :: String -> String -> String -> C ()Source
lookForModuleExporting :: String -> String -> String -> C BoolSource
withModuleExporting :: String -> String -> String -> C () -> C ()Source
findProgram :: String -> [String] -> C StringSource
withProgram :: Monoid a => String -> [String] -> (String -> C a) -> C aSource
configurableProgram :: String -> String -> [String] -> C FranchiseFlagSource
configuredProgram :: String -> C StringSource
withConfiguredProgram :: String -> (String -> C a) -> C aSource
requireLib :: String -> String -> String -> C ()Source
lookForLib :: String -> String -> String -> C BoolSource
withLib :: String -> String -> String -> C () -> C ()Source
checkHeader :: String -> C ()Source
withHeader :: String -> C () -> C ()Source
findPackagesFor :: String -> C ()Source
withLibOutput :: String -> String -> String -> (String -> C ()) -> C ()Source
package :: String -> [String] -> [String] -> C [String]Source
copyright :: String -> C ()Source
license :: String -> C ()Source
version :: String -> C ()Source
addExtraData :: String -> String -> C ()Source
haveExtraData :: String -> C BoolSource
installPackageInto :: String -> String -> C ()Source
amInWindows :: C BoolSource
amInWindows is a hokey function to identify windows systems. It's probably more portable than checking System.Info.os, which isn't saying much.
amLittleEndian :: C BoolSource
darcsDist :: String -> [String] -> C StringSource
inDarcs :: C BoolSource
inGit :: C BoolSource
data ReleaseType Source
Constructors
Numbered
NumberedPreRc
AnyTag
autoVersion :: ReleaseType -> C StringSource
autoPatchVersion :: ReleaseType -> C StringSource
releaseDescription :: ReleaseType -> C StringSource
releaseName :: ReleaseType -> C StringSource
splitMarkdownSource
:: Stringinput filename
-> Stringoutput filename
-> C [String]returns list of files generated

splitMarkdown reads its first argument, which is presumed to be marked-up markdown, and generates any files indicated in the contents. It also outputs a cleaned version of the file that is standard markdown and can be processed by markdown (or pandoc).

If the output filename is an empty string, then the output filename is generated from the input filename.

markdownToHtml :: String -> String -> String -> C [String]Source
markdownToHtml defines a rule for converting a markdown file into an html file.
markdownStringToHtmlString :: String -> String -> C StringSource
markdownStringToHtml accepts the actual markdown content as a string intput, rather than a filename, and it returns the html contents, rather than creating a file, but is otherwise quite similar to markdownToHtml.
autoHeader :: FilePath -> C ()Source
ghcFlags :: [String] -> C ()Source
ldFlags :: [String] -> C ()Source
cFlags :: [String] -> C ()Source
pkgFlags :: [String] -> C ()Source
rmGhcFlags :: [String] -> C ()Source
setOutputDirectory :: String -> C ()Source
systemSource
:: StringCommand
-> [String]Arguments
-> C ()
Run a command
systemOutSource
:: StringProgram name
-> [String]Arguments
-> C StringOutput
Run a process with a list of arguments and get the resulting output from stdout.
systemInOutSource
:: StringProgram name
-> [String]Arguments
-> Stringstdin
-> C Stringoutput
Run a process with a list of arguments and a string as input and get the resulting output from stdout.
systemOutErrToFile :: String -> [String] -> String -> C ExitCodeSource
Run a process with a list of arguments and send anything from stderr or stdout to a file
cd :: String -> C ()Source
Change current subdirectory
mkdir :: FilePath -> C ()Source
mkdir makes a directory and its parents if it doesn't exist.
pwd :: C StringSource
Return the current franchise working directory. This might not be the same thing as the true working directory, as franchise maintains its own internal concept of a working directory, so as to allow separate build threads to have separate working directories in order to build in parallel.
ls :: String -> C [String]Source
cat :: String -> C StringSource
cat is just a strict readFile.
rm_rf :: FilePath -> C ()Source
mv :: String -> String -> C ()Source
mkFile :: FilePath -> String -> C ()Source
withDirectory :: String -> C a -> C aSource
rememberDirectory :: C (C a -> C a)Source
splitPath :: FilePath -> (FilePath, FilePath)Source
stripPrefix :: Eq a => [a] -> [a] -> Maybe [a]Source
setEnv :: String -> String -> C ()Source
getEnv :: String -> C (Maybe String)Source
addToPath :: FilePath -> C ()Source
addToGhcPath :: FilePath -> C ()Source
putS :: String -> C ()Source
putV :: String -> C ()Source
putSV :: String -> String -> C ()Source
splitFile :: String -> (String -> [(FilePath, String)]) -> C [FilePath]Source
Create a build target for test suites.
mapDirectory :: (FilePath -> C a) -> FilePath -> C [a]Source
flag :: String -> String -> C () -> C FranchiseFlagSource
unlessFlag :: String -> String -> C () -> C FranchiseFlagSource
extraData :: String -> StringSource
Produced by Haddock version 0.8