Copyright | 2008-2010 Edward Kmett |
---|---|
License | BSD3 |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | experimental |
Portability | non-portable (functional-dependencies) |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Control.Categorical.Bifunctor
Description
A more categorical definition of Bifunctor
Synopsis
- class (Category r, Category t) => PFunctor p r t | p r -> t, p t -> r where
- class (Category s, Category t) => QFunctor q s t | q s -> t, q t -> s where
- class (PFunctor p r t, QFunctor p s t) => Bifunctor p r s t | p r -> s t, p s -> r t, p t -> r s where
- dimap :: Bifunctor f (Dual s) t u => s b a -> t c d -> u (f a c) (f b d)
- difirst :: PFunctor f (Dual s) t => s b a -> t (f a c) (f b c)
Documentation
class (Category r, Category t) => PFunctor p r t | p r -> t, p t -> r where Source #
Minimal complete definition
class (Category s, Category t) => QFunctor q s t | q s -> t, q t -> s where Source #
Minimal complete definition
Instances
QFunctor Either ((->) :: * -> * -> *) ((->) :: * -> * -> *) Source # | |
QFunctor (,) ((->) :: * -> * -> *) ((->) :: * -> * -> *) Source # | |
Defined in Control.Categorical.Bifunctor | |
QFunctor ((->) :: * -> * -> *) ((->) :: * -> * -> *) ((->) :: * -> * -> *) Source # | |
Defined in Control.Categorical.Bifunctor |
class (PFunctor p r t, QFunctor p s t) => Bifunctor p r s t | p r -> s t, p s -> r t, p t -> r s where Source #
Minimal definition: bimap
Minimal complete definition