Expanding Data.Foldable documentation with overview prose (pre-MR feedback requested)

Viktor Dukhovni ietf-dane at dukhovni.org
Fri Dec 25 08:04:42 UTC 2020


> On Dec 24, 2020, at 7:22 PM, Viktor Dukhovni <ietf-dane at dukhovni.org> wrote:
> 
> If the overall approach is sound, it might perhaps now make sense to add
> some brief text also in each function synopsis that classifies it as
> strict recursive, lazy corecursive, or some hybrid.  But perhaps just
> having that level of detail at the bottom is sufficient?

I've forked the document to explore carving out a third-class
of folds, the *short-circuit* folds, that though they also
are based on `foldr`, are not really corecursive, they just
might terminate early, but produce only a single final result.

This variant is at: <https://imrryr.org/~viktor/haskell/foldable-doc/Data-Foldable-v2.html
The original is at: <https://imrryr.org/~viktor/haskell/foldable-doc/Data-Foldable.html>

Is the new version heading in the right direction?  Is anyone interested
in helping out to get the initial draft in good enough shape for an MR?

-- 
	Viktor.



More information about the Libraries mailing list