ContentsIndex
Distribution.PreProcess
Portability GHC, Hugs
Stability alpha
Maintainer Isaac Jones <ijones@syntaxpolice.org>
Description
Synopsis
preprocessSources :: PackageDescription -> LocalBuildInfo -> Int -> [PPSuffixHandler] -> IO ()
knownSuffixHandlers :: [PPSuffixHandler]
ppSuffixes :: [PPSuffixHandler] -> [String]
type PPSuffixHandler = (String, PackageDescription -> BuildInfo -> LocalBuildInfo -> PreProcessor)
type PreProcessor = FilePath -> FilePath -> Int -> IO ExitCode
removePreprocessed :: FilePath -> [String] -> [String] -> IO ()
removePreprocessedPackage :: PackageDescription -> FilePath -> [String] -> IO ()
ppCpp :: PackageDescription -> BuildInfo -> LocalBuildInfo -> PreProcessor
ppGreenCard :: PreProcessor
ppC2hs :: PreProcessor
ppHsc2hs :: PackageDescription -> BuildInfo -> LocalBuildInfo -> PreProcessor
ppHappy :: PackageDescription -> BuildInfo -> LocalBuildInfo -> PreProcessor
ppAlex :: PackageDescription -> BuildInfo -> LocalBuildInfo -> PreProcessor
ppUnlit :: PreProcessor
Documentation
preprocessSources
:: PackageDescription
-> LocalBuildInfo
-> Intverbose
-> [PPSuffixHandler]preprocessors to try
-> IO ()
Apply preprocessors to the sources from hsSourceDir, to obtain a Haskell source file for each module.
knownSuffixHandlers :: [PPSuffixHandler]
ppSuffixes :: [PPSuffixHandler] -> [String]
Convenience function; get the suffixes of these preprocessors.
type PPSuffixHandler = (String, PackageDescription -> BuildInfo -> LocalBuildInfo -> PreProcessor)
A preprocessor for turning non-Haskell files with the given extension into plain Haskell source files.
type PreProcessor = FilePath -> FilePath -> Int -> IO ExitCode
A preprocessor must fulfill this basic interface. It can be an external program, or just a function.
removePreprocessed
:: FilePathsearch Location
-> [String]Modules
-> [String]suffixes
-> IO ()
Remove the preprocessed .hs files. (do we need to get some .lhs files too?)
removePreprocessedPackage
:: PackageDescription
-> FilePathroot of source tree (where to look for hsSources)
-> [String]suffixes
-> IO ()
ppCpp :: PackageDescription -> BuildInfo -> LocalBuildInfo -> PreProcessor
ppGreenCard :: PreProcessor
ppC2hs :: PreProcessor
ppHsc2hs :: PackageDescription -> BuildInfo -> LocalBuildInfo -> PreProcessor
ppHappy :: PackageDescription -> BuildInfo -> LocalBuildInfo -> PreProcessor
ppAlex :: PackageDescription -> BuildInfo -> LocalBuildInfo -> PreProcessor
ppUnlit :: PreProcessor
Produced by Haddock version 0.6