lub-0.0.3: least upper bounds -- information mergingSource codeContentsIndex
Data.Repr
Stabilityexperimental
Maintainerconal@conal.net
Description

Compute least upper bounds (lub / join) of two values

This version uses associated types for HasRepr

Synopsis
class HasRepr t r | t -> r where
repr :: t -> r
unrepr :: r -> t
onRepr :: (HasRepr a ra, HasRepr b rb) => (ra -> rb) -> a -> b
onRepr2 :: (HasRepr a ra, HasRepr b rb, HasRepr c rc) => (ra -> rb -> rc) -> a -> b -> c
Documentation
class HasRepr t r | t -> r whereSource
A data type representation, in terms of standard data types. Requires that unrepr . repr == id.
Methods
reprSource
:: t
-> rto representation
unreprSource
:: r
-> tfrom representation
show/hide Instances
HasRepr ([] a) (Either () ((,) a ([] a)))
HasRepr ([] a) (Either () ((,) a ([] a)))
HasRepr (Maybe a) (Either () a)
HasRepr (Maybe a) (Either () a)
onRepr :: (HasRepr a ra, HasRepr b rb) => (ra -> rb) -> a -> bSource
Apply a binary function on a repr
onRepr2 :: (HasRepr a ra, HasRepr b rb, HasRepr c rc) => (ra -> rb -> rc) -> a -> b -> cSource
Apply a binary function on a repr
Produced by Haddock version 2.3.0