[Haskell-cafe] ANN: unfoldable-0.4.0

Tillmann Rendel rendel at informatik.uni-marburg.de
Thu Apr 26 21:34:21 CEST 2012


Hi,

Sjoerd Visscher wrote:
> Just as there's a Foldable class, there should also be an Unfoldable class. This package provides one:
>
>    class Unfoldable t where
>      unfold :: Unfolder f =>  f a ->  f (t a)

Just to be sure: That's not a generalization of Data.List.unfoldr, or is 
it somehow?

> Different unfolders provide different ways of generating values, for example:
>   - Random values
>   - Enumeration of all values (depth-first or breadth-first)
>   - Convert from a list
>   - An implementation of QuickCheck's arbitrary should also be possible (still working on that)

Can this be extended to provide a single API that allows testing à la 
SmallCheck, LazySmallCheck and/or QuickCheck without duplicating 
properties or instances?

   Tillmann



More information about the Haskell-Cafe mailing list