[GHC] #7585: Core lint failure when optimizing coercions in branched axioms

#7585: Core lint failure when optimizing coercions in branched axioms -------------------------------+-------------------------------------------- Reporter: goldfire | Owner: goldfire Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.7 | Keywords: TypeFamilies Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: Compile-time crash | Blockedby: Blocking: | Related: -------------------------------+-------------------------------------------- The attached code causes the failure. Core Lint correctly checks branched axioms for internal consistency -- when using branch ''n'' of an axiom, we must ensure that no branch ''m < n'' can possibly apply, no matter what the instantiation for any type variables in the branch may be. However, the coercion optimizer does not respect this property. It will replace coercions used in axioms with equivalent coercions that do not respect this internal consistency property. Everything works out OK in the end (without {{{-dcore-lint}}}, the file compiles and runs correctly), but we go through an invalid state on the way. In particular, the {{{TrPushAx}}} rules are to blame. I'm not sure what the best fix for this is, but it seems to be my job to find it. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7585 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7585: Core lint failure when optimizing coercions in branched axioms
-------------------------------+--------------------------------------------
Reporter: goldfire | Owner: goldfire
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.7 | Keywords: TypeFamilies
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: Compile-time crash | Blockedby:
Blocking: | Related:
-------------------------------+--------------------------------------------
Comment(by eir@…):
commit a6ab0a40ac750914640613c77148e948fabf35d5
{{{
Author: Richard Eisenberg

#7585: Core lint failure when optimizing coercions in branched axioms ---------------------------------+------------------------------------------ Reporter: goldfire | Owner: goldfire Type: bug | Status: closed Priority: normal | Component: Compiler Version: 7.7 | Resolution: fixed Keywords: TypeFamilies | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: Compile-time crash Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by goldfire): * status: new => closed * resolution: => fixed -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7585#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC