ivory-backend-c-0.1.0.7: Ivory C backend.

Safe HaskellSafe
LanguageHaskell2010

Ivory.Compile.C.CmdlineFrontend.Options

Synopsis

Documentation

data OptParser opt Source #

Constructors

OptParser [String] (opt -> opt) 

Instances

Monoid (OptParser opt) Source # 

Methods

mempty :: OptParser opt #

mappend :: OptParser opt -> OptParser opt -> OptParser opt #

mconcat :: [OptParser opt] -> OptParser opt #

success :: (opt -> opt) -> OptParser opt Source #

Option parser succeeded, use this function to transform the default options.

parseOptions :: [OptDescr (OptParser opt)] -> [String] -> Either [String] (opt -> opt) Source #

Option parser failed, emit this message.

XXX currently not used. invalid :: String -> OptParser opt invalid msg = Error [msg]

Yield either a list of errors, or a function to produce an options structure, given a set of default options. Discard any non-options.

data Opts Source #

Constructors

Opts 

Fields

Instances

parseOpts :: [String] -> IO Opts Source #

Parse an Opts structure from a list of strings.