tomland-0.4.0: Bidirectional TOML parser

Safe HaskellNone
LanguageHaskell2010

Toml.Type.AnyValue

Contents

Synopsis

Documentation

data AnyValue Source #

Existential wrapper for Value.

Constructors

AnyValue (Value t) 
Instances
Eq AnyValue Source # 
Instance details

Defined in Toml.Type.AnyValue

Show AnyValue Source # 
Instance details

Defined in Toml.Type.AnyValue

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

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 Source #

matchBool :: Value t -> Maybe Bool Source #

Extract Bool from Value.

matchText :: Value t -> Maybe Text Source #

Extract Text from Value.

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

Extract list of elements of type a from array.