
26 Apr
2012
26 Apr
'12
3:34 p.m.
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