-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Labels
type: enhancementA new feature or addition.A new feature or addition.
Description
There's an MFunctor
class in Control.Monad.Morph
which is something like what I had in mind:
class MFunctor t where
hoist :: Monad m => (forall a. m a -> n a) -> t m b -> t n b
But that imposes a monad constraint. I was thinking more like:
class Functor1 t where
hoist :: (f ~> g) -> t f ~> t g
With the usual laws:
hoist (f ∘ g) = hoist f ∘ hoist g
hoist id = id
We have quite a few types with hoist
operations when you get into free, yoneda, coroutines, etc.
jdegoes and LiamGoodacre
Metadata
Metadata
Assignees
Labels
type: enhancementA new feature or addition.A new feature or addition.