darcs patch: Make toList a member of Foldable

Eelis van der Weegen eelis at eelis.net
Tue Apr 27 17:53:47 EDT 2010

On 2010-04-27 23:22, Isaac Dupree wrote:
> Can this be implemented in terms of GHC's RULES?

Hi Isaac,

Thanks a lot for mentioning the RULES pragma, which I did not know
about. It turns out that using it to specialize Foldable's toList for
things like NonEmptyList works like a charm. Indeed, this is exactly the
use case described in:


Hence, there's no need to make toList a member of Foldable (which, as
you rightly point out, has other problems), and so I withdraw my
proposal. :)

Sorry for the noise,


More information about the Libraries mailing list