[GHC] #13895: "Illegal constraint in a type" error - is it fixable?

GHC ghc-devs at haskell.org
Sun Jun 17 18:40:42 UTC 2018


#13895: "Illegal constraint in a type" error - is it fixable?
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |             Keywords:  TypeInType,
      Resolution:                    |  ImpredicativeTypes
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #12045, #14845,   |  Differential Rev(s):  Phab:D4728
  #14859                             |
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"c63754118cf6c3d0947d0c611f1db39c78acf1b7/ghc" c637541/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="c63754118cf6c3d0947d0c611f1db39c78acf1b7"
 Provide a better error message for unpromotable data constructor contexts

 Trac #14845 brought to light a corner case where a data
 constructor could not be promoted (even with `-XTypeInType`) due to
 an unpromotable constraint in its context. However, the error message
 was less than helpful, so this patch adds an additional check to
 `tcTyVar` catch unpromotable data constructors like these //before//
 they're promoted, and to give a sensible error message in such cases.

 Test Plan: make test TEST="T13895 T14845"

 Reviewers: simonpj, goldfire, bgamari

 Reviewed By: bgamari

 Subscribers: rwbarton, thomie, carter

 GHC Trac Issues: #13895, #14845

 Differential Revision: https://phabricator.haskell.org/D4728
 }}}

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


More information about the ghc-tickets mailing list