Opened 9 years ago

Closed 9 years ago

Last modified 6 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: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

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 9 years ago by simonpj

  • Milestone set to 6.6
  • Owner set to simonpj

comment:2 Changed 9 years ago by simonpj

  • Resolution set to fixed
  • Status changed from new to closed

Fixed, and documented.

There'll be some consequential changes to tests.

Simon

comment:3 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:4 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.