[GHC] #681: non-terminating instances involving FDs
GHC
trac at galois.com
Fri Feb 3 15:30:57 EST 2006
#681: non-terminating instances involving FDs
-------------------------+--------------------------------------------------
Reporter: ross | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.4.1
Severity: normal | Keywords:
Os: Unknown | Difficulty: Unknown
Architecture: Unknown |
-------------------------+--------------------------------------------------
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.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/681>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list