categories-1.0.7: Categories

Copyright2008-2010 Edward Kmett
LicenseBSD3
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable (functional-dependencies)
Safe HaskellTrustworthy
LanguageHaskell2010

Control.Categorical.Functor

Description

A more categorical definition of Functor

Documentation

class (Category r, Category t) => Functor f r t | f r -> t, f t -> r where Source

Methods

fmap :: r a b -> t (f a) (f b) Source

Instances

Functor [] (->) (->) 
Functor IO (->) (->) 
Functor Maybe (->) (->) 
Functor (Either a) (->) (->) 
Functor ((,) a) (->) (->) 
Functor f => Functor (LiftedFunctor f) (->) (->) 

class Functor f a a => Endofunctor f a Source

Instances

Functor f a a => Endofunctor f a 

newtype LiftedFunctor f a Source

Constructors

LiftedFunctor (f a) 

Instances

Functor f => Functor (LiftedFunctor f) (->) (->) 
(Typeable (* -> *) f, Data (f a), Data a) => Data (LiftedFunctor f a) 
Read (f a) => Read (LiftedFunctor f a) 
Show (f a) => Show (LiftedFunctor f a) 
Typeable ((* -> *) -> * -> *) LiftedFunctor 

newtype LoweredFunctor f a Source

Constructors

LoweredFunctor (f a) 

Instances

Functor f (->) (->) => Functor (LoweredFunctor f) 
(Typeable (* -> *) f, Data (f a), Data a) => Data (LoweredFunctor f a) 
Read (f a) => Read (LoweredFunctor f a) 
Show (f a) => Show (LoweredFunctor f a) 
Typeable ((* -> *) -> * -> *) LoweredFunctor