Safe Haskell | None |
---|---|
Language | Haskell2010 |
A module for functors
- class Functor f where
- class Cofunctor f where
- class Bifunctor p where
- class Commutative f where
- class Functor t => Contravariant t where
- newtype Strict a = Strict {
- lazy :: a
- newtype Id a = Id {
- getId :: a
- newtype Const a b = Const {
- getConst :: a
- newtype Flip f a b = Flip {
- unFlip :: f b a
- newtype (f :.: g) a = Compose {
- getCompose :: f (g a)
- data (f :**: g) a = (f a) :**: (g a)
- newtype (f :++: g) a = Sum {}
- newtype Increasing k a = Increasing ((OrdList :.: Assoc k) a)
- emerge :: (Functor f, Unit g) => (f :.: g) a -> (f :.: g) (g a)
- flip :: (Contravariant c, Functor f) => f (c a) -> c (f a)
- project :: (Contravariant c, Functor f) => (a -> c b) -> f a -> c (f b)
- factor :: (Contravariant c, Unit c, Bifunctor f, Functor (f a)) => f (c a) (c b) -> c (f a b)
- (<$>) :: Functor f => (a -> b) -> f a -> f b
- (|||) :: (Choice k, Functor (k a), Functor (k b)) => k a c -> k b d -> k (a :+: b) (c :+: d)
- (<$) :: Functor f => b -> f a -> f b
- (<&>) :: Functor f => f a -> (a -> b) -> f b
- void :: Functor f => f a -> f ()
- left :: (Choice k, Functor (k a), Functor (k c)) => k a b -> k (a :+: c) (b :+: c)
- right :: (Choice k, Functor (k a), Functor (k c)) => k a b -> k (c :+: a) (c :+: b)
- promap :: Cofunctor (Flip f c) => (a -> b) -> f b c -> f a c
- fill :: Functor f => b -> f a -> f b
- map2 :: (Functor f, Functor f') => (a -> b) -> f (f' a) -> f (f' b)
- map3 :: (Functor f, Functor f', Functor f'') => (a -> b) -> f (f' (f'' a)) -> f (f' (f'' b))
- map4 :: (Functor f, Functor f', Functor f'', Functor f''') => (a -> b) -> f (f' (f'' (f''' a))) -> f (f' (f'' (f''' b)))
Documentation
class Functor f where Source #
class Commutative f where Source #
class Functor t => Contravariant t where Source #
Contravariant Id Source # | |
Contravariant Strict Source # | |
Contravariant ((->) a) Source # | |
(Contravariant f, Contravariant g) => Contravariant ((:.:) f g) Source # | |
Contravariant f => Contravariant (Kleisli f a) Source # | |
The Identity Functor
The Constant Functor
A motherflippin' functor
The Composition functor
Compose | |
|
Isomorphic (f (g a)) (f' (g' b)) ((:.:) f g a) ((:.:) f' g' b) Source # | |
(Unit f, Unit g) => Unit ((:.:) f g) Source # | |
(Functor f, Functor g) => Functor ((:.:) f g) Source # | |
(Contravariant f, Contravariant g) => Contravariant ((:.:) f g) Source # | |
(Functor f, Cofunctor g) => Cofunctor ((:.:) f g) Source # | |
Eq (f (g a)) => Eq ((:.:) f g a) Source # | |
Ord (f (g a)) => Ord ((:.:) f g a) Source # | |
(Applicative f, DataMap (g a) k' a, DataMap (f (g a)) k (g a)) => DataMap ((:.:) f g a) (k, k') a Source # | |
newtype Increasing k a Source #
A functor for ordered lists
Increasing ((OrdList :.: Assoc k) a) |
Functor (Increasing k) Source # | |
Ord k => Monoid (Increasing k a) Source # | |
Ord k => Semigroup (Increasing k a) Source # | |
flip :: (Contravariant c, Functor f) => f (c a) -> c (f a) Source #
project :: (Contravariant c, Functor f) => (a -> c b) -> f a -> c (f b) Source #
The Contravariant version of traverse
factor :: (Contravariant c, Unit c, Bifunctor f, Functor (f a)) => f (c a) (c b) -> c (f a b) Source #
(|||) :: (Choice k, Functor (k a), Functor (k b)) => k a c -> k b d -> k (a :+: b) (c :+: d) infixr 1 Source #
map3 :: (Functor f, Functor f', Functor f'') => (a -> b) -> f (f' (f'' a)) -> f (f' (f'' b)) Source #
map4 :: (Functor f, Functor f', Functor f'', Functor f''') => (a -> b) -> f (f' (f'' (f''' a))) -> f (f' (f'' (f''' b))) Source #
Orphan instances
MonadFix Id Source # | |
Monad IO Source # | |
Monad Id Source # | |
Applicative IO Source # | |
Applicative Id Source # | |
SemiApplicative IO Source # | |
SemiApplicative Id Source # | |
Functor [] Source # | |
Functor Maybe Source # | |
Functor IO Source # | |
Functor Tree Source # | |
Functor Interleave Source # | |
Functor OrdList Source # | |
Functor Id Source # | |
Functor ((->) a) Source # | |
Functor (Either b) Source # | |
Functor ((,) b) Source # | |
Functor (Assoc k) Source # | |