language-c-0.3.2: Analysis and generation of C code

Portabilityportable
Stabilityexperimental
Maintainerbenedikt.huber@gmail.com

Language.C.System.Preprocess

Description

Invoking external preprocessors.

Synopsis

Documentation

class Preprocessor cpp whereSource

Preprocessor encapsulates the abstract interface for invoking C preprocessors

Methods

parseCPPArgs :: cpp -> [String] -> Either String (CppArgs, [String])Source

parse the given command line arguments, and return a pair of parsed and ignored arguments

runCPP :: cpp -> CppArgs -> IO ExitCodeSource

run the preprocessor

Instances

data CppOption Source

Generic Options for the preprocessor

data CppArgs Source

Generic arguments for the preprocessor

rawCppArgs :: [String] -> FilePath -> CppArgsSource

use the given preprocessor arguments without analyzing them

addCppOption :: CppArgs -> CppOption -> CppArgsSource

add a typed option to the given preprocessor arguments

addExtraOption :: CppArgs -> String -> CppArgsSource

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 -> BoolSource

guess whether a file is preprocessed (file end with .i)