[GHC] #13658: Assertion failure on HEAD: "optCoercion changed types!"

GHC ghc-devs at haskell.org
Sun May 7 18:50:01 UTC 2017


#13658: Assertion failure on HEAD: "optCoercion changed types!"
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.2.1
       Component:  Compiler          |              Version:  8.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by bgamari):

 Indeed this appears to resolve the issue,
 {{{#!patch
 diff --git a/compiler/types/OptCoercion.hs b/compiler/types/OptCoercion.hs
 index b1aa646a97..03e1d6cb5f 100644
 --- a/compiler/types/OptCoercion.hs
 +++ b/compiler/types/OptCoercion.hs
 @@ -378,6 +378,7 @@ opt_univ env sym prov role oty1 oty2
    | Just (tc1, tys1) <- splitTyConApp_maybe oty1
    , Just (tc2, tys2) <- splitTyConApp_maybe oty2
    , tc1 == tc2
 +  , equalLength tys1 tys2
        -- NB: prov must not be the two interesting ones (ProofIrrel &
 Phantom);
        -- Phantom is already taken care of, and ProofIrrel doesn't relate
 tyconapps
    = let roles    = tyConRolesX role tc1
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13658#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list