has-0.2.1: Pliant data types and functionsSource codeContentsIndex
Provides some pliant data types and functions.
data a :*: b = a :*: b
class Has e s where
inj :: e -> s -> s
prj :: s -> e
upd :: Has e s => (e -> e) -> s -> s
data a :*: b Source
Represents Type level list.
a :*: b
show/hide Instances
(MayHave e h, MayHave e t) => MayHave 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)
(Arbitrary a, Arbitrary b) => Arbitrary (:*: a b)
(CoArbitrary a, CoArbitrary b) => CoArbitrary (:*: a b)
(Monoid a, Monoid b) => Monoid (:*: 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.
show/hide Instances
(MayHave 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.
Produced by Haddock version 2.6.0