[GHC] #15918: GHC panic from QuantifiedConstraints(?)

GHC ghc-devs at haskell.org
Wed Feb 6 09:56:44 UTC 2019


#15918: GHC panic from QuantifiedConstraints(?)
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.6.2
      Resolution:                    |             Keywords:
                                     |  QuantifiedConstraints
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 simonpj):

 I propose to fix this by making `mkCastTy` use `isReflCo` rather than
 `isReflexiveCo`.  That way it will get rid of simple reflexive casts
 produced by the unifier, but will not remove compound `ty ~ ty` casts.
 That will happen in `OptCoercion`.

 This is a bit more efficient (less `tcEqType`) and it comopletely avoids
 this horrible constraint/type choice, meaning that `substTy`, `mkCastTy`
 and `mkAppTy` can all be used both by Core and by the type checker.

 Richard: do you agree?

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


More information about the ghc-tickets mailing list