[QuickCheck] Why does gsubterms need or use Typeable?

Niklas Hambüchen mail at nh2.me
Sat Aug 30 12:51:26 BST 2014


Hi,

I was wondering: Why does gsubterms have a Typeable constraint?

See
https://github.com/nick8325/quickcheck/blob/6445dd/Test/QuickCheck/Arbitrary.hs#L233.

Could it not be implemented with two instances, as was done in
https://github.com/trofi/quickcheck/commit/146cef9a4375f905af0881684d8c29806b4dbb85#diff-dbb7ed6c170c91e99ab32effea0a3770R158,
and potentially be faster (because it's all done at compile time)?

Thanks!

PS: I'm working on cleaning up the old GArbitrary patches; you can find
the current state at https://github.com/nh2/quickcheck/commits/generic.



More information about the QuickCheck mailing list