[Haskell-cafe] ANNOUNCE: Agata-0.2.0
ndmitchell at gmail.com
Wed Apr 21 15:56:13 EDT 2010
> As far as i can tell, derive only works for regular and linear
> recursive types and Regular uses frequencies to regulate size. (Also
> Regular doesn't seem to work for QuickCheck-2).
Derive will generate instances for all types, but uses a fairly
standard formulation (pick between each constructor equally), meaning
that in some cases the generators won't be that good, and will tend to
generate infinite branches.
> Another feature of Agata generators is improved scalability compared
> to other QuickCheck generators, especially for nested collection data
> types (analog to [[[[a]]]] and such). The details of how this works in
> Agata will one day be explained in the documentation, but the
> principle is explained in my masters thesis.
Very neat :-)
I'd welcome an instance generator based on your ideas as a patch to
Derive. Derive provides 3 things:
* Infrastructure - given a definition, it provides tests, ability to
run as template haskell, ability to write to files, auto-generated
documentation etc. I hope to add more infrastructure, such as the
ability to run derivations via a website, so the user need not even
* Derivation inference - a method infer derivations given a single
example (explained in this paper:
* Lots of instances, about 34 different ones.
I/you/we could replace the Arbitrary instance with one based on your
implementation. You don't have to use the derivation inference (and it
probably wouldn't be suitable), but you do get to benefit from the
rest of the infrastructure. People can then run your program via the
command line, integrate easily with preprocessors etc - and still do
the Template Haskell bit too.
>  http://gupea.ub.gu.se/bitstream/2077/22087/1/gupea_2077_22087_1.pdf
Nice, I'll have a read (if it's in English)
More information about the Haskell-Cafe