How do you automatically derive a Gen for a product / coproduct based on its elements? Without using macros / template haskell that is?
-
-
Sure thing! I do that all the time :) But in my hypothetical case I (no longer) have an `Arbitrary` TC derived - I derive a `Generic` TC and spawn `defaultGen` based on them. Overriding the Generic makes no sense, and would result in improper instances.
-
Whis is my point, really: Arbitrary kind of defends itself as a TC because of the ease of overriding. It's an improper TC, with quite arbitrary (
) instances - but it's not the best example of why improper TCs are wrong, because it's sooo useful... - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Gotta try
How do I override just one (middle) level of the derivation tho?