functor-monad-0.1.1.1: FFunctor: functors on (the usual) Functors
Safe HaskellSafe-Inferred
LanguageHaskell2010

FMonad

Description

Monads in the cateogory of Functors.

Synopsis

Documentation

type (~>) f g = forall x. f x -> g x Source #

Natural transformation arrow

FMonad

class FFunctor ff => FMonad ff where Source #

FMonad is to FFunctor what Monad is to Functor.

Monad mFMonad mm
SuperclassFunctor mFFunctor mm
Features return = pure :: a -> m a fpure :: (Functor g) => g ~> mm g
(=<<) :: (a -> m b) -> (m a -> m b) fbind :: (Functor g, Functor h) => (g ~> mm h) -> (mm g ~> mm h)

Methods

fpure :: Functor g => g ~> ff g Source #

fbind :: (Functor g, Functor h) => (g ~> ff h) -> ff g a -> ff h a Source #

Instances

Instances details
FMonad Ap Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> Ap g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> Ap h) -> Ap g a -> Ap h a Source #

FMonad Ap Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> Ap g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> Ap h) -> Ap g a -> Ap h a Source #

FMonad Free Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> Free g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> Free h) -> Free g a -> Free h a Source #

FMonad F Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> F g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> F h) -> F g a -> F h a Source #

FMonad Lift Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> Lift g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> Lift h) -> Lift g a -> Lift h a Source #

FMonad (Rec1 :: (Type -> Type) -> Type -> Type) Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> Rec1 g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> Rec1 h) -> Rec1 g a -> Rec1 h a Source #

Functor f => FMonad (FreeT f) Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> FreeT f g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> FreeT f h) -> FreeT f g a -> FreeT f h a Source #

FMonad (ApT f) Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> ApT f g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> ApT f h) -> ApT f g a -> ApT f h a Source #

Functor f => FMonad (Exp1 f) Source #

g ~ Exp1 Proxy g; Exp1 f (Exp1 f g) ~ Exp1 (f :*: f) g

Instance details

Defined in Data.Functor.Exp

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> Exp1 f g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> Exp1 f h) -> Exp1 f g a -> Exp1 f h a Source #

FMonad (Cont k) Source # 
Instance details

Defined in FMonad.Cont.Curried

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> Cont k g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> Cont k h) -> Cont k g a -> Cont k h a Source #

FMonad (Cont k) Source # 
Instance details

Defined in FMonad.Cont.Exp

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> Cont k g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> Cont k h) -> Cont k g a -> Cont k h a Source #

FFunctor ff => FMonad (FFree ff) Source # 
Instance details

Defined in FMonad.FFree

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> FFree ff g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> FFree ff h) -> FFree ff g a -> FFree ff h a Source #

Monad m => FMonad (FreeT' m) Source # 
Instance details

Defined in FMonad.FreeT

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> FreeT' m g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> FreeT' m h) -> FreeT' m g a -> FreeT' m h a Source #

Applicative f => FMonad (Day f) Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> Day f g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> Day f h) -> Day f g a -> Day f h a Source #

Comonoid f => FMonad (Curried f) Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> Curried f g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> Curried f h) -> Curried f g a -> Curried f h a Source #

FMonad (IdentityT :: (Type -> Type) -> Type -> Type) Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> IdentityT g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> IdentityT h) -> IdentityT g a -> IdentityT h a Source #

FMonad (ReaderT e) Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> ReaderT e g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> ReaderT e h) -> ReaderT e g a -> ReaderT e h a Source #

Monoid s => FMonad (StateT s) Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> StateT s g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> StateT s h) -> StateT s g a -> StateT s h a Source #

Monoid m => FMonad (WriterT m) Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> WriterT m g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> WriterT m h) -> WriterT m g a -> WriterT m h a Source #

(Functor f, forall a. Monoid (f a)) => FMonad (Product f) Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> Product f g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> Product f h) -> Product f g a -> Product f h a Source #

Functor f => FMonad (Sum f) Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> Sum f g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> Sum f h) -> Sum f g a -> Sum f h a Source #

(Functor f, forall a. Monoid (f a)) => FMonad ((:*:) f) Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> (f :*: g) Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> (f :*: h)) -> (f :*: g) a -> (f :*: h) a Source #

Functor f => FMonad ((:+:) f) Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> (f :+: g) Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> (f :+: h)) -> (f :+: g) a -> (f :+: h) a Source #

(Functor s, FMonad mm) => FMonad (StateT s mm) Source # 
Instance details

Defined in FMonad.State.Day

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> StateT s mm g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> StateT s mm h) -> StateT s mm g a -> StateT s mm h a Source #

(Functor s, FMonad mm) => FMonad (StateT s mm) Source # 
Instance details

Defined in FMonad.State.Lan

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> StateT s mm g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> StateT s mm h) -> StateT s mm g a -> StateT s mm h a Source #

(Functor s, FMonad mm) => FMonad (StateT s mm) Source # 
Instance details

Defined in FMonad.State.Ran

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> StateT s mm g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> StateT s mm h) -> StateT s mm g a -> StateT s mm h a Source #

FMonad mm => FMonad (StateT s1 mm) Source # 
Instance details

Defined in FMonad.State.Simple.Inner

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> StateT s1 mm g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> StateT s1 mm h) -> StateT s1 mm g a -> StateT s1 mm h a Source #

FMonad mm => FMonad (StateT s0 mm) Source # 
Instance details

Defined in FMonad.State.Simple.Outer

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> StateT s0 mm g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> StateT s0 mm h) -> StateT s0 mm g a -> StateT s0 mm h a Source #

Comonad w => FMonad (Lan w) Source #
Lan w (Lan w f) ~ Lan (Compose w w) f
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> Lan w g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> Lan w h) -> Lan w g a -> Lan w h a Source #

Comonad w => FMonad (Ran w) Source #
Ran w (Ran w f) ~ Ran (Compose w w) f
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> Ran w g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> Ran w h) -> Ran w g a -> Ran w h a Source #

Monad f => FMonad (Compose f :: (Type -> Type) -> Type -> Type) Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> Compose f g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> Compose f h) -> Compose f g a -> Compose f h a Source #

Monad f => FMonad ((:.:) f :: (Type -> Type) -> Type -> Type) Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> (f :.: g) Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> (f :.: h)) -> (f :.: g) a -> (f :.: h) a Source #

FMonad (M1 c m :: (Type -> Type) -> Type -> Type) Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> M1 c m g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> M1 c m h) -> M1 c m g a -> M1 c m h a Source #

Monad f => FMonad (Precompose f) Source # 
Instance details

Defined in Data.Functor.Precompose

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> Precompose f g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> Precompose f h) -> Precompose f g a -> Precompose f h a Source #

(FMonad ff, FMonad gg) => FMonad (Product ff gg) Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> Product ff gg g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> Product ff gg h) -> Product ff gg g a -> Product ff gg h a Source #

(Monad f, Monad g) => FMonad (Bicompose f g) Source # 
Instance details

Defined in Data.Functor.Bicompose

Methods

fpure :: forall (g0 :: Type -> Type). Functor g0 => g0 ~> Bicompose f g g0 Source #

fbind :: forall (g0 :: Type -> Type) (h :: Type -> Type) a. (Functor g0, Functor h) => (g0 ~> Bicompose f g h) -> Bicompose f g g0 a -> Bicompose f g h a Source #

Applicative g => FMonad (Flip1 ApT g) Source # 
Instance details

Defined in FMonad

Methods

fpure :: forall (g0 :: Type -> Type). Functor g0 => g0 ~> Flip1 ApT g g0 Source #

fbind :: forall (g0 :: Type -> Type) (h :: Type -> Type) a. (Functor g0, Functor h) => (g0 ~> Flip1 ApT g h) -> Flip1 ApT g g0 a -> Flip1 ApT g h a Source #

(Adjunction ff uu, FMonad mm) => FMonad (AdjointT ff uu mm) Source # 
Instance details

Defined in FMonad.Adjoint

Methods

fpure :: forall (g :: Type -> Type). Functor g => g ~> AdjointT ff uu mm g Source #

fbind :: forall (g :: Type -> Type) (h :: Type -> Type) a. (Functor g, Functor h) => (g ~> AdjointT ff uu mm h) -> AdjointT ff uu mm g a -> AdjointT ff uu mm h a Source #

fjoin :: (FMonad ff, Functor g) => ff (ff g) ~> ff g Source #

join but for FMonad instead of Monad.

FMonad laws

Laws

Like Monad, there is a set of laws which every instance of FMonad should satisfy.

fpure is natural in g

Let g, h be arbitrary Functors. For any natural transformation n :: g ~> h,

ffmap n . fpure = fpure . n
fbind is natural in g,h

Let g, g', h, h' be arbitrary Functors. For all natural transformations k :: g ~> ff h, nat_g :: g' ~> g, and nat_h :: h ~> h', the following holds.

fbind (ffmap nat_h . k . nat_g) = ffmap nat_h . fbind k . ffmap nat_g
Left unit
fbind k . fpure = k
Right unit
fbind fpure = id
Associativity
fbind k . fbind j = fbind (fbind k . j)

Laws (in terms of fjoin)

Alternatively, FMonad laws can be stated using fjoin instead.

fpure is natural in g

For all Functor g, Functor h, and n :: g ~> h,

ffmap n . fpure = fpure . n
fjoin is natural in g

For all Functor g, Functor h, and n :: g ~> h,

ffmap n . fjoin = fjoin . ffmap (ffmap n)
Left unit
fjoin . fpure = id
Right unit
fjoin . ffmap fpure = id
Associativity
fjoin . fjoin = fjoin . ffmap fjoin

Re-export

class (forall g. Functor g => Functor (ff g)) => FFunctor ff where Source #

Endofunctors on the category of Functors.

Functor fFFunctor ff
TakesA type aA Functor g
MakesA type f aA Functor (ff g)
Feature fmap :: (a -> b) -> f a -> f b ffmap :: (Functor g, Functor h) => (g ~> h) -> (ff g ~> ff h)

FFunctor laws:

Identity
 ffmap id = id
Composition
 ffmap f . ffmap g = ffmap (f . g)

Examples

This is the FFunctor instance of Sum f. Just like the fmap from Functor (Either a) instance which applies a function to the "Right" value, ffmap applies gh :: g ~> h to the InR (g a) value.

data Sum f g a = InL (f a) | InR (g a)
instance (Functor f) => FFunctor (Sum f) where
    ffmap gh fgx = case fgx of
        InL fx -> InL fx
        InR gx -> InR (gh gx)

Like Sum f, some instances of FFunctor are modified Functors in such a way that its parameter is swapped for g a. But not every instance of FFunctor is like this. The following data type Foo g a is a FFunctor which uses a Functor g and a type parameter a separately.

data Foo g a = Foo (String -> a) (g String)

instance Functor (Foo g) where
  fmap :: (a -> b) -> Foo g a -> Foo g b
  fmap f (Foo strToA gStr) = Foo (f . strToA) gStr

instance FFunctor Foo where
  ffmap :: (g ~> h) -> Foo g a -> Foo h a
  ffmap gh (Foo strToA gStr) = Foo strToA (gh gStr)

An FFunctor instance can use its Functor parameter nested. The following Bar g a example uses g nested twice.

newtype Bar g a = Bar (g (g a))

instance Functor g => Functor (Bar g) where
  fmap f (Bar gga) = Bar $ fmap (fmap f gga)

instance FFunctor Bar where
  ffmap gh (Bar gga) = Bar $ fmap gh (gh gga)

Non-example

ContT r has the right kind to be an FFunctor, that is, (Type -> Type) -> Type -> Type. But there can be no instances of FFunctor (ContT r), because ContT r m uses m in negative position.

newtype ContT r m a = ContT {
    runContT :: (a -> m r) -> m r
    --                ^       ^ positive position
    --                | negative position
  }

Methods

ffmap :: (Functor g, Functor h) => (g ~> h) -> ff g x -> ff h x Source #

Instances

Instances details
FFunctor Ap Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> Ap g x -> Ap h x Source #

FFunctor Ap Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> Ap g x -> Ap h x Source #

FFunctor Cofree Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> Cofree g x -> Cofree h x Source #

FFunctor Free Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> Free g x -> Free h x Source #

FFunctor F Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> F g x -> F h x Source #

FFunctor Lift Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> Lift g x -> Lift h x Source #

FFunctor (Rec1 :: (Type -> Type) -> Type -> Type) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> Rec1 g x -> Rec1 h x Source #

FFunctor (EnvT e) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> EnvT e g x -> EnvT e h x Source #

FFunctor (StoreT s) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> StoreT s g x -> StoreT s h x Source #

FFunctor (TracedT m) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> TracedT m g x -> TracedT m h x Source #

Functor f => FFunctor (FreeT f) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> FreeT f g x -> FreeT f h x Source #

FFunctor (ApT f) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> ApT f g x -> ApT f h x Source #

FFunctor (Exp1 f) Source # 
Instance details

Defined in Data.Functor.Exp

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> Exp1 f g x -> Exp1 f h x Source #

FFunctor (Cont k) Source # 
Instance details

Defined in FMonad.Cont.Curried

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> Cont k g x -> Cont k h x Source #

FFunctor (Cont k) Source # 
Instance details

Defined in FMonad.Cont.Exp

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> Cont k g x -> Cont k h x Source #

FFunctor ff => FFunctor (FFree ff) Source # 
Instance details

Defined in FMonad.FFree

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> FFree ff g x -> FFree ff h x Source #

Functor m => FFunctor (FreeT' m) Source # 
Instance details

Defined in FMonad.FreeT

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> FreeT' m g x -> FreeT' m h x Source #

FFunctor (Day f) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> Day f g x -> Day f h x Source #

Functor f => FFunctor (Curried f) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> Curried f g x -> Curried f h x Source #

FFunctor (IdentityT :: (Type -> Type) -> Type -> Type) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> IdentityT g x -> IdentityT h x Source #

FFunctor (ReaderT e) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> ReaderT e g x -> ReaderT e h x Source #

FFunctor (StateT s) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> StateT s g x -> StateT s h x Source #

FFunctor (WriterT m) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> WriterT m g x -> WriterT m h x Source #

Functor f => FFunctor (Product f) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> Product f g x -> Product f h x Source #

Functor f => FFunctor (Sum f) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> Sum f g x -> Sum f h x Source #

Functor f => FFunctor ((:*:) f) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> (f :*: g) x -> (f :*: h) x Source #

Functor f => FFunctor ((:+:) f) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> (f :+: g) x -> (f :+: h) x Source #

(FFunctor ff, FFunctor gg) => FFunctor (FCompose ff gg) Source # 
Instance details

Defined in FFunctor.FCompose

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> FCompose ff gg g x -> FCompose ff gg h x Source #

(FFunctor mm, Functor s) => FFunctor (StateT s mm) Source # 
Instance details

Defined in FMonad.State.Day

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> StateT s mm g x -> StateT s mm h x Source #

(FFunctor mm, Functor s) => FFunctor (StateT s mm) Source # 
Instance details

Defined in FMonad.State.Lan

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> StateT s mm g x -> StateT s mm h x Source #

(FFunctor mm, Functor s) => FFunctor (StateT s mm) Source # 
Instance details

Defined in FMonad.State.Ran

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> StateT s mm g x -> StateT s mm h x Source #

FFunctor mm => FFunctor (StateT s1 mm) Source # 
Instance details

Defined in FMonad.State.Simple.Inner

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> StateT s1 mm g x -> StateT s1 mm h x Source #

FFunctor mm => FFunctor (StateT s0 mm) Source # 
Instance details

Defined in FMonad.State.Simple.Outer

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> StateT s0 mm g x -> StateT s0 mm h x Source #

FFunctor (Lan f) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> Lan f g x -> Lan f h x Source #

FFunctor (Ran f) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> Ran f g x -> Ran f h x Source #

Functor f => FFunctor (Compose f :: (Type -> Type) -> Type -> Type) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> Compose f g x -> Compose f h x Source #

Functor f => FFunctor ((:.:) f :: (Type -> Type) -> Type -> Type) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> (f :.: g) x -> (f :.: h) x Source #

FFunctor (M1 c m :: (Type -> Type) -> Type -> Type) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> M1 c m g x -> M1 c m h x Source #

Functor f => FFunctor (Precompose f) Source # 
Instance details

Defined in Data.Functor.Precompose

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> Precompose f g x -> Precompose f h x Source #

(FFunctor ff, FFunctor gg) => FFunctor (Product ff gg) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> Product ff gg g x -> Product ff gg h x Source #

(FFunctor ff, FFunctor gg) => FFunctor (Sum ff gg) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> Sum ff gg g x -> Sum ff gg h x Source #

(Functor f, Functor g) => FFunctor (Bicompose f g) Source # 
Instance details

Defined in Data.Functor.Bicompose

Methods

ffmap :: forall (g0 :: Type -> Type) (h :: Type -> Type) x. (Functor g0, Functor h) => (g0 ~> h) -> Bicompose f g g0 x -> Bicompose f g h x Source #

Functor g => FFunctor (Flip1 ApT g) Source # 
Instance details

Defined in FFunctor

Methods

ffmap :: forall (g0 :: Type -> Type) (h :: Type -> Type) x. (Functor g0, Functor h) => (g0 ~> h) -> Flip1 ApT g g0 x -> Flip1 ApT g h x Source #

(FFunctor ff, FFunctor ww, FFunctor uu) => FFunctor (AdjointT ff uu ww) Source # 
Instance details

Defined in FComonad.Adjoint

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> AdjointT ff uu ww g x -> AdjointT ff uu ww h x Source #

(FFunctor ff, FFunctor mm, FFunctor uu) => FFunctor (AdjointT ff uu mm) Source # 
Instance details

Defined in FMonad.Adjoint

Methods

ffmap :: forall (g :: Type -> Type) (h :: Type -> Type) x. (Functor g, Functor h) => (g ~> h) -> AdjointT ff uu mm g x -> AdjointT ff uu mm h x Source #