Opened 19 months ago

Last modified 12 months ago

#7269 new bug

GeneralizedNewtypeDeriving and PolyKinds

Reported by: dreixel Owned by: dreixel
Priority: normal Milestone: 7.8.3
Component: Compiler Version: 7.6.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

The following code

{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}

class C (a :: k)

instance C Int

newtype MyInt = MyInt Int deriving C

fails with this error:

    Cannot derive well-kinded instance of form `C k (MyInt ...)'
      Class `C' expects an argument of kind `k'
    In the newtype declaration for `MyInt'

I believe this should work, and I think I know what's going on. I'm working on it.

Change History (1)

comment:1 Changed 12 months ago by igloo

  • Difficulty set to Unknown
  • Milestone set to 7.8.1
Note: See TracTickets for help on using tickets.