hpp-0.4.0: A Haskell pre-processor

Safe HaskellSafe
LanguageHaskell2010

Hpp.Config

Description

Preprocessor Configuration

Synopsis

Documentation

data ConfigF f #

Pre-processor configuration parameterized over a functor. This is used to normalize partial configurations, ConfigF Maybe, and configurations suitable for the pre-processor logic, ConfigF Identity. Specifically, the source file name of the file being processed must be set.

type Config = ConfigF Identity #

A fully-populated configuration for the pre-processor.

realizeConfig :: ConfigF Maybe -> Maybe Config #

Ensure that required configuration fields are supplied.

curFileName :: Config -> FilePath #

Extract the current file name from a configuration.

includePaths :: Config -> [FilePath] #

Extract the include paths name from a configuration.

spliceLongLines :: Config -> Bool #

Determine if continued long lines should be spliced.

eraseCComments :: Config -> Bool #

Determine if C-style comments should be erased.

inhibitLinemarkers :: Config -> Bool #

Determine if generation of linemarkers should be inhibited.

replaceTrigraphs :: Config -> Bool #

Determine if trigraph sequences should be replaced.

prepDate :: Config -> DateString #

The date the pre-processor was run on.

prepTime :: Config -> TimeString #

The time of the active pre-processor invocation.

defaultConfigF :: ConfigF Maybe #

A default configuration with no current file name set.

formatPrepDate :: UTCTime -> DateString #

Format a date according to the C spec.

formatPrepTime :: UTCTime -> TimeString #

Format a time according to the C spec.

defaultConfigFNow :: IO (ConfigF Maybe) #

A default preprocessor configuration with date and time stamps taken from the current system time.