hpp-0.4.1: A Haskell pre-processor

Safe HaskellNone
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 :: (Monad m, HppCaps m) => [String] -> HppT [String] (Parser m [TOKEN]) () Source #

Run a stream of lines through the preprocessor.

hppReadFile :: Monad m => Int -> FilePath -> HppT src m src Source #

hppIO :: Config -> Env -> ([String] -> IO ()) -> [String] -> IO () Source #

General hpp runner against input source file lines. Any errors encountered are thrown with error.

type HppCaps t = (HasError t, HasHppState t, HasEnv t) Source #

The dynamic capabilities offered by HPP

hppFileContents :: Config -> Env -> FilePath -> [String] -> IO (Either Error [String]) Source #

hpp runner that returns output lines.