Opened 11 years ago

Closed 11 years ago

Last modified 9 years ago

#681 closed bug (fixed)

non-terminating instances involving FDs

Reported by: ross Owned by: simonpj
Priority: normal Milestone: 6.6
Component: Compiler Version: 6.4.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


GHC accepts the following (tc109) with -fglasgow-exts:

class P a
class R a b | b->a

instance (P a,R a b) => P [b]

However as pointed out in the FD-CHR paper (example 15), adding the instance

instance R [[a]] [a]

will cause non-termination. Such instances (context contains variables not in the head, even if determined by variables in the head) should be forbidden without -fallow-undecidable-instances. (This is the second part of the Bound Variable Condition in the above paper). Similar cases are tc118 and tc125.

Change History (4)

comment:1 Changed 11 years ago by simonpj

Milestone: 6.6
Owner: set to simonpj

comment:2 Changed 11 years ago by simonpj

Resolution: fixed
Status: newclosed

Fixed, and documented.

There'll be some consequential changes to tests.


comment:3 Changed 9 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:4 Changed 9 years ago by simonmar

Operating System: UnknownUnknown/Multiple
Note: See TracTickets for help on using tickets.