hpp-0.5.0.1: A Haskell pre-processor

Safe HaskellNone
LanguageHaskell2010

Hpp.RunHpp

Description

Mid-level 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.

runHpp :: forall m a src. (MonadIO m, HasHppState m) => (FilePath -> m src) -> (src -> m ()) -> HppT src m a -> m (Either (FilePath, Error) (HppResult a)) Source #

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

General hpp runner against input source file lines. Output lines are fed to the caller-supplied sink function. Any errors encountered are thrown with error.

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

The dynamic capabilities offered by HPP

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

hpp runner that returns output lines.

data HppResult a Source #

Constructors

HppResult 

Fields