Skip to content

Export Curried Yoneda utils #72

@treeowl

Description

@treeowl

lens uses Curried (Yoneda f) (Yoneda f) and an internal liftCurriedYoneda to implement confusing. There are other applications where these pieces are more useful separately. For example, you can use a class

class GTraversable t where
  gtraverse :: (a -> f b) -> t a -> Curried (Yoneda f) (Yoneda f) a

to implement generic deriving of Traversable that seems to work almost exactly the same as GHC deriving (if you use a modified form of Generic1). Perhaps it would even make sense to add a CurriedYoneda type and explain what it can do for you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions