[GHC] #15648: Core Lint error with source-level unboxed equality

GHC ghc-devs at haskell.org
Mon Oct 1 13:08:49 UTC 2018


#15648: Core Lint error with source-level unboxed equality
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.8.1
       Component:  Compiler          |              Version:  8.4.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #15209            |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Richard asks why this typechecks:
 {{{
 legitToJank :: LegitEquality a b -> JankyEquality a b
 legitToJank Legit = Jank
 }}}
 given that
 {{{
   Jank :: $ueqT a b -> JankyEquality a b
 }}}
 Turns it it's because `tcSplitSigmaTy` ultimately uses `isPredTy` to
 decide which the invisible arguments are.  And `isPredTy` has a special
 case to return `True` for `t1 ~# t2` and `t1 ~R# t2`.

 I'm not sure of the consequences of making `isPredTy` return `False` for
 `t1 ~# t2`.  (E.g. it is used in `isEvVar`.)

 I'm a bit confused about what the Right Thing to do is.

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


More information about the ghc-tickets mailing list