Portability | All |
---|---|
Stability | experimental |
Maintainer | Malcolm Wallace <Malcolm.Wallace@cs.york.ac.uk> |
Safe Haskell | Safe-Infered |
Language.Preprocessor.Cpphs
Description
Include the interface that is exported
- runCpphs :: CpphsOptions -> FilePath -> String -> IO String
- runCpphsReturningSymTab :: CpphsOptions -> FilePath -> String -> IO (String, [(String, String)])
- cppIfdef :: FilePath -> [(String, String)] -> [String] -> BoolOptions -> String -> IO [(Posn, String)]
- macroPass :: [(String, String)] -> BoolOptions -> [(Posn, String)] -> IO String
- macroPassReturningSymTab :: [(String, String)] -> BoolOptions -> [(Posn, String)] -> IO (String, [(String, String)])
- data CpphsOptions = CpphsOptions {}
- data BoolOptions = BoolOptions {}
- parseOptions :: [String] -> Either String CpphsOptions
- defaultCpphsOptions :: CpphsOptions
- defaultBoolOptions :: BoolOptions
- module Language.Preprocessor.Cpphs.Position
Documentation
runCpphsReturningSymTab :: CpphsOptions -> FilePath -> String -> IO (String, [(String, String)])
Arguments
:: FilePath | File for error reports |
-> [(String, String)] | Pre-defined symbols and their values |
-> [String] | Search path for #includes |
-> BoolOptions | Options controlling output style |
-> String | The input file content |
-> IO [(Posn, String)] | The file after processing (in lines) |
Run a first pass of cpp, evaluating #ifdef's and processing #include's, whilst taking account of #define's and #undef's as we encounter them.
Arguments
:: [(String, String)] | Pre-defined symbols and their values |
-> BoolOptions | Options that alter processing style |
-> [(Posn, String)] | The input file content |
-> IO String | The file after processing |
Walk through the document, replacing calls of macros with the expanded RHS.
Arguments
:: [(String, String)] | Pre-defined symbols and their values |
-> BoolOptions | Options that alter processing style |
-> [(Posn, String)] | The input file content |
-> IO (String, [(String, String)]) | The file and symbol table after processing |
Walk through the document, replacing calls of macros with the expanded RHS. Additionally returns the active symbol table after processing.
data BoolOptions
Options representable as Booleans.
Constructors
BoolOptions | |
Fields
|
parseOptions :: [String] -> Either String CpphsOptions
Parse all command-line options.
defaultCpphsOptions :: CpphsOptions
Default options.
defaultBoolOptions :: BoolOptions
Default settings of boolean options.