hpp-0.1.0.0: A Haskell pre-processor

Safe HaskellSafe
LanguageHaskell2010

Hpp

Description

Front-end interface to the pre-processor.

Synopsis

Documentation

parseDefinition :: [Token] -> Maybe (String, Macro) Source

Parse the definition of an object-like or function macro.

preprocess :: Env -> String -> ErrHpp (Env, String) Source

preprocess env src runs the pre-processor over source code src beginning with macro binding environment env.

liftHpp :: Hpp a -> ErrHpp a Source

Lift an Hpp into an ErrHpp

errorHpp :: Error -> ErrHpp a Source

Raise an error condition.

getConfig :: Hpp Config Source

Obtain the current Config

setConfig :: Config -> Hpp () Source

Set the current Config

hppReadFile :: Int -> FilePath -> Hpp String Source

Read a file as an Hpp action

runErrHppIO :: Config -> ErrHpp a -> IO a Source

Run an Hpp action that might fail with a given initial configuration.