[GHC] #12466: Typechecker regression: Inaccessible code in a type expected by the context

GHC ghc-devs at haskell.org
Sat Aug 6 15:04:44 UTC 2016


#12466: Typechecker regression: Inaccessible code in a type expected by the context
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.2.1
       Component:  Compiler (Type    |              Version:  8.1
  checker)                           |
      Resolution:                    |             Keywords:
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):

 To clarify, I think the `constraints` code is an occurrence of the same
 bug since

 1. `dividesGcd`'s type signature has a context (`Divides a b`, which is
 the same as `a ~ Gcd a b`) in which GHC determines an equality is
 unattainable.
 2. The body of `dividesGcd` doesn't use the context, since it's defined in
 terms of `axiom` (a.k.a. `unsafeCoerce`).

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


More information about the ghc-tickets mailing list