tomland-0.5.0: Bidirectional TOML parser

Safe HaskellSafe
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

NFData AnyValue Source # 
Instance details

Defined in Toml.Type.AnyValue

Methods

rnf :: 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.

toMArray :: [AnyValue] -> Maybe (Value TArray) Source #

Function for creating Array from list of AnyValue.

Matching

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

matchBool :: Value t -> Maybe Bool Source #

Extract Value from Value.

matchText :: Value t -> Maybe Text Source #

Extract Value from Value.

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

Extract list of elements of type a from array.