ymdryo / classy-effects

An interface for a handler-independent, typeclass-based effect system.
Mozilla Public License 2.0
0 stars 1 forks source link

Enable derivation of `makeHFunctor` for rank-polymorphic mixed data types. #1

Open ymdryo opened 1 year ago

ymdryo commented 1 year ago

For example, the Provider effect class:

class Provider c i g (f :: Type -> Type) where
    provide :: i -> (forall h. c h => (f ~> h) -> h a) -> f (g a)

and the effect class data-type:

data ProviderH c i g f a where
    Provide :: i -> (forall h. c h => (f ~> h) -> h a) -> ProviderH c i g f (g a)

Improvement is needed to make makeHFunctor work automatically for this.