I remember seeing a package that offered a function used something like this:
$(deriveThingy [d| instance Foo a => Thingy a |])
to allow the user to specify the constraint(s) for a generated instance. I'd love to borrow the code for that, but I can't remember what package it was in, what class it derived, etc. Can anyone help?