[GHC] #8129: Constraint solver panic due to derived type function equality (was: Constraint solver panic when -ddump-tc-trace is used)
GHC
ghc-devs at haskell.org
Mon Sep 16 16:36:43 CEST 2013
#8129: Constraint solver panic due to derived type function equality
--------------------------------------------+------------------------------
Reporter: adamgundry | Owner:
Type: bug | Status: new
Priority: high | Milestone:
Component: Compiler (Type checker) | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time crash | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
--------------------------------------------+------------------------------
Changes (by adamgundry):
* priority: normal => high
Comment:
The above example, without `-ddump-tc-trace`, now causes the latest HEAD
to panic with:
{{{
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 7.7.20130915 for i386-unknown-linux):
ASSERT failed!
file compiler/typecheck/TcMType.lhs line 809
[D] _ :: main:Main.F{tc rpc} x_aAu{tv} [tau[0]]
ghc-prim:GHC.Types.~{(w) tc 31Q} y_aAv{tv} [tau[0]]
(CFunEqCan)
}}}
It looks like the problem was introduced in
e365d4963f1061878269502f256b4a56ca273a78 (the fix to #8262). The new code
calls `solveWantedsTcMWithEvBinds` with `solve_wanteds`, rather than
`solve_wanteds_and_drop`. But `solveWantedsTcMWithEvBinds` calls `zonkWC`,
which works only with wanted (not derived) constraints.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8129#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list