[GHC] #13674: GHC doesn't discharge heterogeneous equality constraint when it ought to

GHC ghc-devs at haskell.org
Wed May 10 15:16:02 UTC 2017


#13674: GHC doesn't discharge heterogeneous equality constraint when it ought to
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |
      Resolution:                    |             Keywords:  TypeInType
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 > This constraint is an occurs-check failure and is surely going to lead
 to an error.

 Ah, that's a good point. I forgot that `Lcm m m` doesn't reduce as a type
 family (you're only ever to get out the `lcm` of `m` and `m` at the value
 level by using `knownNat` with the reflection-style trickery in `magic`,
 but this doesn't work at the type level).

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


More information about the ghc-tickets mailing list