category-0.2.0.1: Categorical types and classes

Safe HaskellNone
LanguageHaskell2010

Control.Categorical.Functor

Synopsis

Documentation

class (Category s, Category t) => Functor (s :: α -> α -> *) (t :: β -> β -> *) (f :: α -> β) where Source #

Minimal complete definition

map

Methods

map :: s a b -> t (f a) (f b) Source #

Instances

Functor α β s t f => Functor α β (Iso α s) t f Source # 

Methods

map :: f a b -> t (f a) (f b) Source #

Functor α β s t f => Functor α β (Iso α s) (Dual β β t) f Source # 

Methods

map :: f a b -> t (f a) (f b) Source #

Category α s => Functor α * s ((->) LiftedRep LiftedRep) (s a) Source # 

Methods

map :: s a a b -> t (f a) (f b) Source #

Category α s => Functor α * s ((->) LiftedRep LiftedRep) (Proxy α) Source # 

Methods

map :: Proxy α a b -> t (f a) (f b) Source #

Category α s => Functor α * s ((->) LiftedRep LiftedRep) (Const α a) Source # 

Methods

map :: Const α a a b -> t (f a) (f b) Source #

(Functor k * s ((->) LiftedRep LiftedRep) f, Functor k * s ((->) LiftedRep LiftedRep) g) => Functor k * s ((->) LiftedRep LiftedRep) (Product k f g) Source # 

Methods

map :: Product k f g a b -> t (f a) (f b) Source #

(Functor k * s ((->) LiftedRep LiftedRep) f, Functor k * s ((->) LiftedRep LiftedRep) g) => Functor k * s ((->) LiftedRep LiftedRep) (Sum k f g) Source # 

Methods

map :: Sum k f g a b -> t (f a) (f b) Source #

Category k s => Functor k (k -> *) (Dual k k s) (NT * k * ((->) LiftedRep LiftedRep)) s Source # 

Methods

map :: s a b -> t (f a) (f b) Source #

Functor f => Functor * * ((->) LiftedRep LiftedRep) ((->) LiftedRep LiftedRep) f Source # 

Methods

map :: f a b -> t (f a) (f b) Source #

Functor * * ((->) LiftedRep LiftedRep) ((->) LiftedRep LiftedRep) Identity Source # 

Methods

map :: Identity a b -> t (f a) (f b) Source #

Functor * * ((->) LiftedRep LiftedRep) ((->) LiftedRep LiftedRep) (Either a) Source # 

Methods

map :: Either a a b -> t (f a) (f b) Source #

Functor * * ((->) LiftedRep LiftedRep) ((->) LiftedRep LiftedRep) ((,) a) Source # 

Methods

map :: (a, a) b -> t (f a) (f b) Source #

Functor * (* -> *) ((->) LiftedRep LiftedRep) (NT * * * ((->) LiftedRep LiftedRep)) Either Source # 

Methods

map :: Either a b -> t (f a) (f b) Source #

Functor * (* -> *) ((->) LiftedRep LiftedRep) (NT * * * ((->) LiftedRep LiftedRep)) (,) Source # 

Methods

map :: (a, b) -> t (f a) (f b) Source #

Functor * (k -> *) ((->) LiftedRep LiftedRep) (NT * k * ((->) LiftedRep LiftedRep)) (Const k) Source # 

Methods

map :: Const k a b -> t (f a) (f b) Source #

Functor (k -> *) ((k -> *) -> k -> *) (NT * k * ((->) LiftedRep LiftedRep)) (NT (k -> *) (k -> *) (k -> *) (NT * k * ((->) LiftedRep LiftedRep))) (Product k) Source # 

Methods

map :: Product k a b -> t (f a) (f b) Source #

Functor (k -> *) ((k -> *) -> k -> *) (NT * k * ((->) LiftedRep LiftedRep)) (NT (k -> *) (k -> *) (k -> *) (NT * k * ((->) LiftedRep LiftedRep))) (Sum k) Source # 

Methods

map :: Sum k a b -> t (f a) (f b) Source #

Functor (k -> *) (k -> *) (NT * k * ((->) LiftedRep LiftedRep)) (NT * k * ((->) LiftedRep LiftedRep)) (Product k f) Source # 

Methods

map :: Product k f a b -> t (f a) (f b) Source #

Functor (k -> *) (k -> *) (NT * k * ((->) LiftedRep LiftedRep)) (NT * k * ((->) LiftedRep LiftedRep)) (Sum k f) Source # 

Methods

map :: Sum k f a b -> t (f a) (f b) Source #

Functor (k1 -> *) ((k2 -> k1) -> k2 -> *) (NT * k1 * ((->) LiftedRep LiftedRep)) (NT (k2 -> *) (k2 -> k1) (k2 -> *) (NT * k2 * ((->) LiftedRep LiftedRep))) (Compose k1 k2) Source # 

Methods

map :: Compose k1 k2 a b -> t (f a) (f b) Source #

Functor k2 * s ((->) LiftedRep LiftedRep) f => Functor (k1 -> k2) (k1 -> *) (NT k2 k1 k2 s) (NT * k1 * ((->) LiftedRep LiftedRep)) (Compose k2 k1 f) Source # 

Methods

map :: Compose k2 k1 f a b -> t (f a) (f b) Source #

type EndoFunctor s = Functor s s Source #

Deprecated: Use Endofunctor

(<$>) :: Functor s (->) f => s a b -> f a -> f b infixl 4 Source #

newtype NT s f g Source #

Constructors

NT 

Fields

  • nt :: forall a. s (f a) (g a)
     

Instances

Category k s => Functor k (k -> *) (Dual k k s) (NT * k * ((->) LiftedRep LiftedRep)) s Source # 

Methods

map :: s a b -> t (f a) (f b) Source #

Functor * (* -> *) ((->) LiftedRep LiftedRep) (NT * * * ((->) LiftedRep LiftedRep)) Either Source # 

Methods

map :: Either a b -> t (f a) (f b) Source #

Functor * (* -> *) ((->) LiftedRep LiftedRep) (NT * * * ((->) LiftedRep LiftedRep)) (,) Source # 

Methods

map :: (a, b) -> t (f a) (f b) Source #

Functor * (k -> *) ((->) LiftedRep LiftedRep) (NT * k * ((->) LiftedRep LiftedRep)) (Const k) Source # 

Methods

map :: Const k a b -> t (f a) (f b) Source #

Functor (k -> *) ((k -> *) -> k -> *) (NT * k * ((->) LiftedRep LiftedRep)) (NT (k -> *) (k -> *) (k -> *) (NT * k * ((->) LiftedRep LiftedRep))) (Product k) Source # 

Methods

map :: Product k a b -> t (f a) (f b) Source #

Functor (k -> *) ((k -> *) -> k -> *) (NT * k * ((->) LiftedRep LiftedRep)) (NT (k -> *) (k -> *) (k -> *) (NT * k * ((->) LiftedRep LiftedRep))) (Sum k) Source # 

Methods

map :: Sum k a b -> t (f a) (f b) Source #

Functor (k -> *) (k -> *) (NT * k * ((->) LiftedRep LiftedRep)) (NT * k * ((->) LiftedRep LiftedRep)) (Product k f) Source # 

Methods

map :: Product k f a b -> t (f a) (f b) Source #

Functor (k -> *) (k -> *) (NT * k * ((->) LiftedRep LiftedRep)) (NT * k * ((->) LiftedRep LiftedRep)) (Sum k f) Source # 

Methods

map :: Sum k f a b -> t (f a) (f b) Source #

Functor (k1 -> *) ((k2 -> k1) -> k2 -> *) (NT * k1 * ((->) LiftedRep LiftedRep)) (NT (k2 -> *) (k2 -> k1) (k2 -> *) (NT * k2 * ((->) LiftedRep LiftedRep))) (Compose k1 k2) Source # 

Methods

map :: Compose k1 k2 a b -> t (f a) (f b) Source #

Functor k2 * s ((->) LiftedRep LiftedRep) f => Functor (k1 -> k2) (k1 -> *) (NT k2 k1 k2 s) (NT * k1 * ((->) LiftedRep LiftedRep)) (Compose k2 k1 f) Source # 

Methods

map :: Compose k2 k1 f a b -> t (f a) (f b) Source #

Category k2 s => Category (k1 -> k2) (NT k2 k1 k2 s) Source # 

Methods

id :: cat a a #

(.) :: cat b c -> cat a b -> cat a c #

Groupoid k2 s => Groupoid (k1 -> k2) (NT k2 k1 k2 s) Source # 

Methods

invert :: k a b -> k b a Source #