bookkeeper-0.2.5: Anonymous records and overloaded labels

Safe HaskellNone
LanguageHaskell2010

Bookkeeper.Lens

Contents

Synopsis

Lenses

rlens :: (Settable field val' old new, Gettable field old val, Functor f) => Key field -> (val -> f val') -> Book' old -> f (Book' new) Source #

Build a lens from a field

julian ^. rlens #age
   = 28

Symbols can also be used directly as lenses, so you probably don't need to use rlens:

julian ^. #age
   = 28
julian & #age .~ 29
   = Book {age = 29, name = "Julian K. Arni"}

Orphan instances

(Settable field valnew old new, Gettable field old val, Functor f, (~) * s2ft (Book' old -> f (Book' new))) => IsLabel field ((val -> f valnew) -> s2ft) Source # 

Methods

fromLabel :: (val -> f valnew) -> s2ft #