Safe Haskell | None |
---|---|
Language | Haskell2010 |
Mid-level interface to the pre-processor.
- parseDefinition :: [TOKEN] -> Maybe (String, Macro)
- preprocess :: (Monad m, HppCaps m) => [String] -> HppT [String] (Parser m [TOKEN]) ()
- runHpp :: forall m a src. (MonadIO m, HasHppState m) => (FilePath -> m src) -> (src -> m ()) -> HppT src m a -> m (Either (FilePath, Error) (HppResult a))
- hppIOSink :: Config -> Env -> ([String] -> IO ()) -> [String] -> IO [FilePath]
- type HppCaps t = (HasError t, HasHppState t, HasEnv t)
- hppIO :: Config -> Env -> FilePath -> [String] -> IO (Either Error ([FilePath], [String]))
- data HppResult a = HppResult {
- hppFilesRead :: [FilePath]
- hppResult :: a
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