[GHC] #11066: Inacessible branch should be warning - otherwise breaks type soundness?

GHC ghc-devs at haskell.org
Tue Nov 7 08:38:36 UTC 2017


#11066: Inacessible branch should be warning - otherwise breaks type soundness?
-------------------------------------+-------------------------------------
        Reporter:  rrnewton          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.4.1
       Component:  Compiler          |              Version:  7.10.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  warning at compile-time            |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #8128, #8740      |  Differential Rev(s):  Phab:D1454
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 But `foo (unsafeCoerce Refl)` asks GHC to come up with a proof of `1 :~:
 Gcd 3 4` and pass it as an implicit argument.  Which it cannot do.
 (Remember this isn't the usual `Gcd`; it's a hypothetical nullary
 function.)  So in fact I can't call `foo`.

 Rather than speculate about Ed let's see if he wants to say anything
 himself.

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


More information about the ghc-tickets mailing list