ghc-7.2.2: The GHC API

CmdLineParser

Synopsis

Documentation

data OptKind m Source

Constructors

NoArg (EwM m ()) 
HasArg (String -> EwM m ()) 
SepArg (String -> EwM m ()) 
Prefix (String -> EwM m ()) 
OptPrefix (String -> EwM m ()) 
OptIntSuffix (Maybe Int -> EwM m ()) 
IntSuffix (Int -> EwM m ()) 
PassFlag (String -> EwM m ()) 
AnySuffix (String -> EwM m ()) 
PrefixPred (String -> Bool) (String -> EwM m ()) 
AnySuffixPred (String -> Bool) (String -> EwM m ()) 

newtype CmdLineP s a Source

Constructors

CmdLineP 

Fields

runCmdLine :: s -> (a, s)
 

Instances

data Flag m Source

Constructors

Flag 

data FlagSafety Source

This determines how a flag should behave when Safe Haskell mode is on.

Constructors

EnablesSafe

This flag is a little bit of a hack. We give the safe haskell flags (-XSafe and -XSafeLanguage) this safety type so we can easily detect when safe haskell mode has been enable in a module pragma as this changes how the rest of the parsing should happen.

AlwaysAllowed

Flag is always allowed

RestrictedFunction

Flag is allowed but functions in a reduced way

CmdLineOnly

Flag is only allowed on command line, not in pragma

NeverAllowed

Flag isn't allowed at all

data EwM m a Source

Instances

Monad m => Monad (EwM m) 

addErr :: Monad m => String -> EwM m ()Source

addWarn :: Monad m => String -> EwM m ()Source

liftEwM :: Monad m => m a -> EwM m aSource