Open locallycompact opened 2 years ago
Yes, the representation we use for sum types leads to a quadratic number of nested data constructors:
Z v
S(Z v)
S(S(Z v))
....
Type-checking these will therefore run in O(n^2) with relation to the number of data constructors of the sum type. If you know about a way to avoid this, that would be great as it would speed up things drastically, both a runtime and at compile-time.
Hi, I'm trying to derive Show and Eq for a big type with approximately 200 constructors.
This basically doesn't terminate. I can't say how long this takes.