#3324: Add Foldable and Traversable instances for ((,) a)
-----------------------------+----------------------------------------------
Reporter: YitzGale | Owner:
Type: proposal | Status: new
Priority: normal | Component: libraries/base
Version: 6.11 | Severity: normal
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
-----------------------------+----------------------------------------------
These instances are pretty obvious, and no
more or less trivial than the existing instances
for Prelude types. I have found them to be
useful.
Since we are touching these modules anyway,
I am attaching two additional minor patches to this
proposal.
One is to add a few additional explicit method
implementations in the Foldable and Traversable
instances for Prelude types. These might sometimes
be slightly more efficient, and they better match
the strictness and style of the existing explicit method
implementations.
The other is to fix the documentation for the functions
fmapDefault and foldMapDefault in Data.Traversable.
Contrary to what is stated, these cannot be used
as methods in superclasses, since the superclasses
must already exist before these functions can be
defined. Instead, I have paraphrased what
is stated in the documentation above: that the
corresponding superclass methods should be
equivalent to these.
Discussion period: two weeks.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3324>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs