[GHC] #16263: GHC accepts illegal constraint in kind

GHC ghc-devs at haskell.org
Fri Feb 1 09:19:05 UTC 2019


#16263: GHC accepts illegal constraint in kind
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.8.1
       Component:  Compiler          |              Version:  8.6.3
      Resolution:                    |             Keywords:  TypeInType,
                                     |  newcomer
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 Good spot!

 But there is code in GHC that specifically deals with equality constraints
 (only) in kinds: see
 * `Inst.tcInstTyBinder`.
 * `dc_theta_illegal_constraint` in `TcHsType.tcTyVar` (which deals with
 promoting data constructors)

 I talked with Richard about this last night.  I think we agreed that we
 can systematically and consistently support equality constraints in types.
 If so, we should un-do the commit you reference.

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


More information about the ghc-tickets mailing list