Safe Haskell | None |
---|
A module for functors
- class Functor f where
- map :: (a -> b) -> f a -> f b
- class Cofunctor f where
- comap :: (a -> b) -> f b -> f a
- class Bifunctor p where
- dimap :: (c -> a) -> (b -> d) -> p a b -> p c d
- 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 {}
- (<$>) :: 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
- 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))
Documentation
Functor [] | |
Functor IO | |
Functor Maybe | |
Functor Tree | |
Functor Set | |
Functor Interleave | |
Functor OrdList | |
Functor Id | |
Functor ZipTree | |
Functor ZipList | |
Functor TimeVal | |
Functor ((->) a) | |
Functor (Either b) | |
Functor ((,) b) | |
Functor (Map k) | |
Functor (Const a) | |
Functor f => Functor (Backwards f) | |
Functor m => Functor (MaybeT m) | |
Functor m => Functor (TreeT m) | |
Functor m => Functor (ListT m) | |
Functor (Future t) | |
Functor (Reactive t) | |
Functor (Event t) | |
(Functor f, Functor g) => Functor (:++: f g) | |
(Functor f, Functor g) => Functor (:**: f g) | |
(Functor f, Functor g) => Functor (:.: f g) | |
(Functor f, Functor g) => Functor (Compose' f g) | |
Functor m => Functor (StateT s m) | |
Functor m => Functor (ReaderT r m) | |
Functor m => Functor (WriterT w m) | |
Functor f => Functor (ContT r f) | |
Functor m => Functor (EitherT e m) | |
Functor m => Functor (ParserT w s m) | |
Functor f => Functor (RWST r w s f) |
The Identity Functor
The Constant Functor
A motherflippin' functor
The Composition functor
Compose | |
|
Monad m => MonadTrans (:.: m) | |
Isomorphic (f (g a)) (f' (g' b)) (:.: f g a) (:.: f' g' b) | |
(Unit f, Unit g) => Unit (:.: f g) | |
(MonadFix f, Traversable g, Monad g) => MonadFix (:.: f g) | |
(Traversable g, Monad f, Monad g) => Monad (:.: f g) | |
(Applicative f, Applicative g) => Applicative (:.: f g) | |
(Functor f, Functor g) => Functor (:.: f g) | |
(Functor f, Cofunctor g) => Cofunctor (:.: f g) | |
(Foldable f, Foldable g) => Foldable (:.: f g) | |
(Traversable f, Traversable g) => Traversable (:.: f g) | |
(Applicative f, Monoid (g a)) => Monoid (:.: f g a) | |
(Applicative f, Semigroup (g a)) => Semigroup (:.: f g a) |
(f a) :**: (g a) |
(Unit f, Unit g) => Unit (:**: f g) | |
(Applicative f, Applicative g) => Applicative (:**: f g) | |
(Functor f, Functor g) => Functor (:**: f g) | |
(Foldable f, Foldable g) => Foldable (:**: f g) | |
(Traversable f, Traversable g) => Traversable (:**: f g) |
(Functor f, Functor g) => Functor (:++: f g) | |
(Foldable f, Foldable g) => Foldable (:++: f g) | |
(Traversable f, Traversable g) => Traversable (:++: f g) |