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

Safe HaskellNone
LanguageHaskell2010

Accessors

Synopsis

Documentation

class Lookup a where Source

Things which you can make a tree of labeled getters for. You should derive this using GHC.Generics.

Minimal complete definition

Nothing

Methods

toAccessorTree :: a -> (b -> a) -> AccessorTree b Source

data AccessorTree a Source

Constructors

Data (String, String) [(String, AccessorTree a)] 
ATGetter (a -> Double) 

Instances

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