hpp-0.4.0: A Haskell pre-processor

Safe HaskellNone
LanguageHaskell2010

Hpp

Description

Front-end interface to the pre-processor.

Synopsis

Documentation

parseDefinition :: [TOKEN] -> Maybe (String, Macro) #

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

preprocess :: (Monad m, HppCaps m) => ([String] -> src) -> [String] -> HppT [String] (Parser m [TOKEN]) () #

Run a stream of lines through the preprocessor.

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

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

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

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

The dynamic capabilities offered by HPP

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

hpp runner that returns output lines.