Skip to content

Existentially quantified types for hoistFix #25

Description

@alexeytochin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions