[GHC] #14331: Overzealous free-floating kind check causes deriving clause to be rejected

GHC ghc-devs at haskell.org
Mon Oct 9 18:58:02 UTC 2017


#14331: Overzealous free-floating kind check causes deriving clause to be rejected
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.2.1
  checker)                           |
      Resolution:                    |             Keywords:  deriving
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 goldfire):

 But I see `instance C (a :: k) D` as fully equivalent to `instance forall
 k (a :: k). C a D`. They just make different things explicit, but both
 declarations have the same static and dynamic semantics.

 And, I don't quite agree that clauses in a `deriving` are macro-like. They
 are types of kind `... -> Type -> Constraint`, where the `...` may be
 empty. My desire to put `forall` in there is more macro-like, I admit...
 but no more so than the syntax for pattern synonym types or even GADT
 constructor types.

 I believe that you are genuinely confused here. But I'm afraid I'm equally
 confused as to why you're confused.

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


More information about the ghc-tickets mailing list