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

Safe HaskellNone
LanguageHaskell2010

Accessors

Synopsis

Documentation

data AccessorTree a Source

Constructors

Data (String, String) [(String, AccessorTree a)] 
Field (Field a) 

Instances

data Field a Source

Constructors

FieldBool (Lens' a Bool) 
FieldDouble (Lens' a Double) 
FieldFloat (Lens' a Float) 
FieldInt (Lens' a Int) 
FieldString (Lens' a String) 
FieldSorry

a field which is not yet supported

describeField :: Field a -> String Source

Return the type of field, such as Bool, Double, String, etc.

sameFieldType :: Field a -> Field b -> Bool Source

Returns True if the type of fields is the same.

showTree :: AccessorTree a -> (Double -> String) -> a -> String Source

Show a tree of values

showFlat :: forall a. AccessorTree a -> Bool -> (Double -> String) -> a -> String Source

Show a list of values . True --> align the colums, False --> total mayhem