base-compat-0.7.1: A compatibility layer for base

Safe HaskellSafe-Inferred
LanguageHaskell98

System.Console.GetOpt.Compat

Synopsis

Documentation

data ArgOrder a :: * -> *

What to do with options following non-options

Constructors

RequireOrder

no option processing after first non-option

Permute

freely intersperse options and non-options

ReturnInOrder (String -> a)

wrap non-options into options

Instances

data OptDescr a :: * -> *

Each OptDescr describes a single option.

The arguments to Option are:

  • list of short option characters
  • list of long option strings (without "--")
  • argument descriptor
  • explanation of option for user

Constructors

Option [Char] [String] (ArgDescr a) String 

Instances

data ArgDescr a :: * -> *

Describes whether an option takes an argument or not, and if so how the argument is injected into a value of type a.

Constructors

NoArg a

no argument expected

ReqArg (String -> a) String

option requires argument

OptArg (Maybe String -> a) String

optional argument

Instances