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

Safe HaskellSafe-Inferred

Ivory.Compile.C.CmdlineFrontend.Options

Synopsis

Documentation

data OptParser opt Source

Constructors

Success (opt -> opt) 
Error [String] 

Instances

success :: (opt -> opt) -> OptParser optSource

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.

parseOpts :: [String] -> IO OptsSource

Parse an Opts structure from a list of strings.