[GHC] #9695: GADT Constraint breaks type inference

GHC ghc-devs at haskell.org
Thu Oct 16 18:05:47 UTC 2014


#9695: GADT Constraint breaks type inference
-------------------------------------+-------------------------------------
              Reporter:  crockeea    |            Owner:
                  Type:  bug         |           Status:  closed
              Priority:  normal      |        Milestone:
             Component:  Compiler    |          Version:  7.8.3
            Resolution:  invalid     |         Keywords:
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:  GHC         |       Blocked By:
  rejects valid program              |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
Changes (by goldfire):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 > Is that expected behavior for GADTs?

 Yes. Type inference in the presence of an equality constraint -- even a
 seemingly-irrelevant one -- is incomplete. The error message definitely
 needs to get better (#9109), but I'm not sure the behavior can be fixed.
 The [http://research.microsoft.com/~simonpj/papers/constraints/jfp-
 outsidein.pdf OutsideIn] paper, section 5.2, gives a nice description of
 the problem. This section is readable without reading the rest of the
 paper (although the short, preceding section 5.1 helps somewhat).

 I'm closing as "invalid", but if you think there's something deeper going
 on here, please reopen.

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


More information about the ghc-tickets mailing list