category-extras-0.53.6: Various modules and constructs inspired by category theoryContentsIndex
Control.Functor.Representable
Portabilitynon-portable (class-associated types)
Stabilityexperimental
MaintainerEdward Kmett <ekmett@gmail.com>
Description
Documentation
class Functor f => Representable f x where
Methods
rep :: (x -> a) -> f a
unrep :: f a -> (x -> a)
show/hide Instances
Representable Both Bool
Representable (Reader e) (Coreader e ())
Representable (EitherF a b) (Either a b)
(Adjunction f1 g1, Adjunction f2 g2) => Representable (CompF g1 g2) (CompF f2 f1 ())
rep :: Representable f x => (x -> a) -> f a
unrep :: Representable f x => f a -> (x -> a)
class ContraFunctor f => Corepresentable f x where
Methods
corep :: (a -> x) -> f a
uncorep :: f a -> (a -> x)
corep :: Corepresentable f x => (a -> x) -> f a
uncorep :: Corepresentable f x => f a -> (a -> x)
data Both a
Constructors
Both a a
show/hide Instances
Functor Both
Representable Both Bool
data EitherF a b c
Constructors
EitherF (a -> c) (b -> c)
show/hide Instances
Functor (EitherF a b)
Representable (EitherF a b) (Either a b)
Produced by Haddock version 2.1.0