[Haskell-cafe] Generating arbitrary functions with QuickCheck?

2010-09-15 Thread Matias Eyzaguirre
Hi, I'v been reading a small paper/lesson on writing parser combinators in Haskell, and it seems more or less straightforward. In this case a parser is defined thusly: > type Parser a = String -> Maybe (a, String) And then it goes on to list some simple parsers, and then starts going on about co

[Haskell-cafe] QuickCheck and Pairing Heaps

2010-08-10 Thread Matias Eyzaguirre
Hi, I'm trying to figure out QuickCheck and how to generate arbitrary test data form complex data structures; I thought an interesting experiment would be Pairing Heaps. A pairing heap is essentially just a tree whose nodes obey the heap property (for all nodes A in a pairing whose nodes can be com