[GHC] #4517: Add Data.Functor.Backwards to transformers

Ross Paterson ross at soi.city.ac.uk
Sat Nov 20 20:08:03 EST 2010

On Sat, Nov 20, 2010 at 05:25:23PM -0500, roconnor at theorem.ca wrote:
> Data.Functor.Backwards is a wrapper for functors that allow Foldable,
> Traversable, and Applicative functors to be operated backwards.  It is
> similar to Dual for Monoids.  The Applicative instance runs effects in
> reversed order.  The Foldable instance folds from right to left, The
> Traversable instance traverses from right to left.

The current version of the module is here:


I think this fits with transformers, and the implementation for
Traversable is cute.

My only question is whether a constructor that flips Applicatives should
be identified with one that reverses the traversal order of containers.

More information about the Libraries mailing list