Skip to content

"Free" cheatsheet #458

@JordanMartinez

Description

@JordanMartinez

This was posted in the Haskell Slack:

you could model the free "whatever" [i.e. Free Monad, Free Applicative, etc.] generated by a given functor as:

-- Using poly kinds' kind signatures here for clarity of idea
type Free :: ((Type -> Type) -> Constraint) -> (Type -> Type) -> Type -> Type
type Free c f a = forall g. c g => (f ~> g) -> g a

Metadata

Metadata

Assignees

No one assigned

    Labels

    ToResearchSomething I want to look into more. It might appear in this repo later or not.enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions