[GHC] #15979: Core Lint error with LiberalTypeSynonyms

GHC ghc-devs at haskell.org
Sat Dec 1 18:38:02 UTC 2018


#15979: Core Lint error with LiberalTypeSynonyms
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.8.1
       Component:  Compiler          |              Version:  8.6.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 No, the Lint check is right.  The kinding rules for types are given in
 comment:4 of #15791.  And, I assume, in `docs/core-spec`.

 So the bug is in the type checker which should reject the program.  It's
 not easy to do that for type inference, because we lack a constraint that
 says "This kind should be either (TYPE r) or Constraint".

 I think the easiest way to fix this would be in `checkValidType`; and
 specifically in the code you have just been working on in `check_type`.
 In a sigma-type (the code you moved up) add a test that the kind of the
 body is `TYPE r` or `Constraint`.

 Richard, right?

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


More information about the ghc-tickets mailing list