lambda-options-1.1.0.0: Declarative command-line parser with type-driven pattern matching.

Safe HaskellSafe
LanguageHaskell2010

Text.LambdaOptions.Parseable.List

Description

List newtype wrapper that can be pattern matched against for parsing.

Synopsis

Documentation

newtype List a Source #

A simple wrapper over [a]. Used to avoid overlapping instances for Parseable [a] and Parseable String.

Constructors

List 

Fields

Instances
Eq a => Eq (List a) Source # 
Instance details

Defined in Text.LambdaOptions.Parseable.List

Methods

(==) :: List a -> List a -> Bool #

(/=) :: List a -> List a -> Bool #

Data a => Data (List a) Source # 
Instance details

Defined in Text.LambdaOptions.Parseable.List

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> List a -> c (List a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (List a) #

toConstr :: List a -> Constr #

dataTypeOf :: List a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (List a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (List a)) #

gmapT :: (forall b. Data b => b -> b) -> List a -> List a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> List a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> List a -> r #

gmapQ :: (forall d. Data d => d -> u) -> List a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> List a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> List a -> m (List a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> List a -> m (List a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> List a -> m (List a) #

Ord a => Ord (List a) Source # 
Instance details

Defined in Text.LambdaOptions.Parseable.List

Methods

compare :: List a -> List a -> Ordering #

(<) :: List a -> List a -> Bool #

(<=) :: List a -> List a -> Bool #

(>) :: List a -> List a -> Bool #

(>=) :: List a -> List a -> Bool #

max :: List a -> List a -> List a #

min :: List a -> List a -> List a #

Read a => Read (List a) Source # 
Instance details

Defined in Text.LambdaOptions.Parseable.List

Show a => Show (List a) Source # 
Instance details

Defined in Text.LambdaOptions.Parseable.List

Methods

showsPrec :: Int -> List a -> ShowS #

show :: List a -> String #

showList :: [List a] -> ShowS #

Parseable a => Parseable (List a) Source #

Greedily parses arguments item-wise. Never fails.

Example: parse (words "5 67 NaN") == (Just (List [5,67]), 2)

Instance details

Defined in Text.LambdaOptions.Parseable.List

Methods

parse :: [String] -> (Maybe (List a), Int) Source #