Allow Undecidable Instances
Brief Explanation
There are no restrictions on the form of instance declarations (see FlexibleInstances). Implementations ensure termination by making context reduction fail if it exceeds some depth limit.
References
- Undecidable instances in the GHC User's guide.
Tickets
#71 | Allow Undecidable Instances |
---|
Pros
- allows safe instances that would be rejected by conservative termination checks (see FlexibleInstances).
- offered by GHC and Hugs with appropriate options for several years.
- experience has shown that increasing the depth limit rarely makes a difference in which programs are accepted.
Cons
- the boundary between legal and illegal programs is unclear, and possibly implementation-dependent.