hdirect-0.21.0: An IDL compiler for Haskell

GetOpt

Documentation

data Opt a b Source

Constructors

Opt ([String] -> a -> Maybe ([String], a, b)) 

Instances

Monad (Opt s) 
Functor (Opt s) 
MonadPlus (Opt s) 

updState :: (a -> a) -> Opt a ()Source

catchOpt :: Opt a b -> Opt a b -> Opt a bSource

prefixed :: String -> Opt a b -> Opt a bSource

matches :: (String -> Bool) -> (String -> Opt a b) -> Opt a bSource

flag :: String -> (a -> a) -> Opt a ()Source

flags :: [(String, a -> a)] -> Opt a ()Source

opts :: [Opt a b] -> Opt a bSource

orOpt :: Opt a b -> Opt a b -> Opt a bSource

thenOpt :: Opt a b -> Opt a b -> Opt a bSource

toggle :: String -> String -> String -> (Bool -> a -> a) -> Opt a ()Source

toggles :: String -> String -> [(String, Bool -> a -> a)] -> Opt a ()Source

prefixArg :: String -> (String -> a -> a) -> Opt a ()Source

optionArg :: String -> (String -> Opt a b) -> Opt a bSource

(-=) :: String -> a -> Opt [a] ()Source

(-==) :: String -> (String -> a) -> Opt [a] ()Source

(-===) :: String -> (String -> a) -> Opt [a] ()Source

(-====) :: String -> (Maybe String -> a) -> Opt [a] ()Source

(-?) :: (String -> Bool) -> (String -> a) -> Opt [a] ()Source

getOpts :: Opt a b -> a -> [String] -> ([String], a)Source