has-0.2: Generic Haskell's Record Accessors



Provides some pliant data types and functions.



data a :*: b Source

Represents Type level list.


a :*: b 


(MayHas e h, MayHas e t) => MayHas e (:*: h t) 
(TyOr x y b, Contains e h x, Contains e t y) => Contains e (:*: h t) b 
(Bounded a, Bounded b) => Bounded (:*: a b) 
(Eq a, Eq b) => Eq (:*: a b) 
(Ord a, Ord b) => Ord (:*: a b) 
(Read a, Read b) => Read (:*: a b) 
(Show a, Show b) => Show (:*: a b) 

class Has e s whereSource

Provides plient function. Holds e == prj (inj e s) for all s and e.


inj :: e -> s -> sSource

Injects a value of type e into s if s contains the type e.

prj :: s -> eSource

Projects a value of type e out from s if s contains the type e.


(MayHas e s, Contains e s TyTrue) => Has e s 

upd :: Has e s => (e -> e) -> s -> sSource

Updates a value e in s, using given function e -> e.