wiki:UndecidableInstances

Version 5 (modified by ross@…, 8 years ago) (diff)

--

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

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.