hpp-0.3.0.0: A Haskell pre-processor

Safe HaskellSafe
LanguageHaskell2010

Hpp.Config

Description

Preprocessor Configuration

Synopsis

Documentation

newtype TimeString Source

A String representing a time.

Constructors

TimeString 

newtype DateString Source

A String representing a date.

Constructors

DateString 

data ConfigF f Source

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 Source

A fully-populated configuration for the pre-processor.

realizeConfig :: ConfigF Maybe -> Maybe Config Source

Ensure that required configuration fields are supplied.

curFileName :: Config -> FilePath Source

Extract the current file name from a configuration.

includePaths :: Config -> [FilePath] Source

Extract the include paths name from a configuration.

spliceLongLines :: Config -> Bool Source

Determine if continued long lines should be spliced.

eraseCComments :: Config -> Bool Source

Determine if C-style comments should be erased.

inhibitLinemarkers :: Config -> Bool Source

Determine if generation of linemarkers should be inhibited.

prepDate :: Config -> DateString Source

The date the pre-processor was run on.

prepTime :: Config -> TimeString Source

The time of the active pre-processor invocation.

defaultConfigF :: ConfigF Maybe Source

A default configuration with no current file name set.

formatPrepDate :: UTCTime -> DateString Source

Format a date according to the C spec.

formatPrepTime :: UTCTime -> TimeString Source

Format a time according to the C spec.

defaultConfigFNow :: IO (ConfigF Maybe) Source

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