generic-accessors-0.6.0.0: stringly-named getters for generic data

Safe HaskellNone
LanguageHaskell2010

Accessors.Dynamic

Contents

Synopsis

Documentation

toDData :: forall a. Lookup a => a -> DTree Source

convert to a dynamic value

updateLookupable :: Lookup a => a -> DTree -> Either String a Source

Update something using a dynamic representation

sameDFieldType :: DField -> DField -> Bool Source

Returns True if the type of fields is the same.

some utility functions for working with DSimpleEnums

denumToString :: DSimpleEnum -> Either String String Source

Get the constructor string or an error message.

denumToStringOrMsg :: DSimpleEnum -> String Source

Get the constructor string or an error message without telling which is which.

denumSetString :: DSimpleEnum -> String -> Either String DSimpleEnum Source

Try to update an enum with its constructor. Fail if not a valid constructor.

denumSetIndex :: DSimpleEnum -> Int -> Either String DSimpleEnum Source

Try to update an enum with its index. Fail if out of bounds.