Copyright | (c) 2008 Benedikt Huber |
---|---|
License | BSD-style |
Maintainer | benedikt.huber@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
Invoking external preprocessors.
- class Preprocessor cpp where
- data CppOption
- data CppArgs = CppArgs {
- cppOptions :: [CppOption]
- extraOptions :: [String]
- cppTmpDir :: Maybe FilePath
- inputFile :: FilePath
- outputFile :: Maybe FilePath
- rawCppArgs :: [String] -> FilePath -> CppArgs
- addCppOption :: CppArgs -> CppOption -> CppArgs
- addExtraOption :: CppArgs -> String -> CppArgs
- cppFile :: FilePath -> CppArgs
- runPreprocessor :: Preprocessor cpp => cpp -> CppArgs -> IO (Either ExitCode InputStream)
- isPreprocessed :: FilePath -> Bool
Documentation
class Preprocessor cpp where Source #
Preprocessor
encapsulates the abstract interface for invoking C preprocessors
Generic Options for the preprocessor
Generic arguments for the preprocessor
CppArgs | |
|
rawCppArgs :: [String] -> FilePath -> CppArgs Source #
use the given preprocessor arguments without analyzing them
addCppOption :: CppArgs -> CppOption -> CppArgs Source #
add a typed option to the given preprocessor arguments
addExtraOption :: CppArgs -> String -> CppArgs Source #
add a string option to the given preprocessor arguments
runPreprocessor :: Preprocessor cpp => cpp -> CppArgs -> IO (Either ExitCode InputStream) Source #
run the preprocessor and return an InputStream
if preprocesssing succeeded
isPreprocessed :: FilePath -> Bool Source #
guess whether a file is preprocessed (file end with .i)