cpphs
Copyright2006 Malcolm Wallace
LicenseLGPL
MaintainerMalcolm Wallace <Malcolm.Wallace@cs.york.ac.uk>
Stabilityexperimental
PortabilityAll
Safe HaskellSafe-Inferred
LanguageHaskell98

Language.Preprocessor.Cpphs.Options

Description

This module deals with Cpphs options and parsing them

Synopsis

Documentation

data CpphsOptions #

Cpphs options structure.

Constructors

CpphsOptions 

Fields

Instances

Instances details
Show CpphsOptions # 
Instance details

Defined in Language.Preprocessor.Cpphs.Options

Methods

showsPrec :: Int -> CpphsOptions -> ShowS

show :: CpphsOptions -> String

showList :: [CpphsOptions] -> ShowS

data BoolOptions #

Options representable as Booleans.

Constructors

BoolOptions 

Fields

  • macros :: Bool

    Leave #define and #undef in output of ifdef?

  • locations :: Bool

    Place #line droppings in output?

  • hashline :: Bool

    Write #line or {-# LINE #-} ?

  • pragma :: Bool

    Keep #pragma in final output?

  • stripEol :: Bool

    Remove C eol (//) comments everywhere?

  • stripC89 :: Bool

    Remove C inline (/**/) comments everywhere?

  • lang :: Bool

    Lex input as Haskell code?

  • ansi :: Bool

    Permit stringise # and catenate ## operators?

  • layout :: Bool

    Retain newlines in macro expansions?

  • literate :: Bool

    Remove literate markup?

  • warnings :: Bool

    Issue warnings?

Instances

Instances details
Show BoolOptions # 
Instance details

Defined in Language.Preprocessor.Cpphs.Options

Methods

showsPrec :: Int -> BoolOptions -> ShowS

show :: BoolOptions -> String

showList :: [BoolOptions] -> ShowS

parseOptions :: [String] -> Either String CpphsOptions #

Parse all command-line options.

defaultBoolOptions :: BoolOptions #

Default settings of boolean options.

trailing :: Eq a => [a] -> [a] -> [a] #

Trim trailing elements of the second list that match any from the first list. Typically used to remove trailing forward/back slashes from a directory path.