[Haskell-cafe] Re: QuickCheck: Arbitrary for a complex type
joelr1 at gmail.com
Wed Apr 4 17:59:45 EDT 2007
One last bit then...
My identifiers should start with letter <|> char '_' and the tail
should be alphaNum <|> char '_'.
I guess I can use choose and oneof to produce the right set of
characters but how do I combine the two into a single identifier of
a given length (up to 20 chars, say)?
On Apr 4, 2007, at 5:27 PM, Fawzi Mohamed wrote:
> Great, just one thing that could be important : when you have
> recursive structures (like your Statement through Compound) be sure
> to use
> sized (\mySize -> ...)
> as generator for arbitrary so that you can avoid infinite looping.
More information about the Haskell-Cafe