tomland-0.3: TOML parser

Safe HaskellNone
LanguageHaskell2010

Toml.Type.AnyValue

Contents

Synopsis

Documentation

data AnyValue #

Existential wrapper for Value.

Constructors

AnyValue (Value t) 
Instances
Eq AnyValue # 
Instance details

Defined in Toml.Type.AnyValue

Show AnyValue # 
Instance details

Defined in Toml.Type.AnyValue

reifyAnyValues :: Value t -> [AnyValue] -> Either TypeMismatchError [Value t] #

Checks whether all elements inside given list of AnyValue have the same type as given Value. Returns list of Value t without given Value.

Matching

liftMatch :: (AnyValue -> Maybe a) -> Value t -> Maybe a #

matchBool :: Value t -> Maybe Bool #

Extract Bool from Value.

matchDouble :: Value t -> Maybe Double #

Extract Double from Value.

matchText :: Value t -> Maybe Text #

Extract Text from Value.

matchArray :: (AnyValue -> Maybe a) -> Value t -> Maybe [a] #

Extract list of elements of type a from array.