Skip to content

Traversable with data applicatives #190

@utdemir

Description

@utdemir

This discussion started at #126, where we discussed a proposed linear Foldable implementation and the fact that it is not implied by linear Traversable; and ended up concluding that what we need is a variant of the existing Traversable which uses data Applicatives instead of control Applicatives.

See the thread at #126 for a longer discussion, but I'm quoting the critical comment there, from @aspiwack:

We've established that being “traversable” by Control.Applicative-s is a common occurrence, but doesn't imply Foldable.

However, being “traversable” by Data.Applicative-s, a less common occurrence, does imply Foldable (indeed Const m is a Data.Applicative (for m a monoid)).

So, here is the thought. Why don't we give a name to the equivalent of traverse, but with Data.Applicative and add it to the Foldable type class (I'd call it fold but it's already taken, let's find another name)?

This issue to discuss whether we indeed want another Traversable using data Applicatives; and if we do, bikeshed the details (mainly the name, I guess).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions