Thank you for the library!
Why existentially quantified types for
hoistFix :: Functor f => (forall a. f a -> g a) -> Fix f -> Fix g
and
hoistFix' :: Functor g => (forall a. f a -> g a) -> Fix f -> Fix g
type annotations. But not simply
hoistFix :: Functor f => (f (Fix g) -> g (Fix g)) -> Fix f -> Fix g
and
hoistFix' :: Functor g => (f (Fix f) -> g (Fix f)) -> Fix f -> Fix g
Probably the original idea behind was to map f -> g to Fix f -> Fix g.
But in fact the proposed method are more general.
Thank you for the library!
Why existentially quantified types for
hoistFix :: Functor f => (forall a. f a -> g a) -> Fix f -> Fix gand
hoistFix' :: Functor g => (forall a. f a -> g a) -> Fix f -> Fix gtype annotations. But not simply
hoistFix :: Functor f => (f (Fix g) -> g (Fix g)) -> Fix f -> Fix gand
hoistFix' :: Functor g => (f (Fix f) -> g (Fix f)) -> Fix f -> Fix gProbably the original idea behind was to map
f -> gtoFix f -> Fix g.But in fact the proposed method are more general.