[GHC] #9968: DeriveAnyClass fails on multi-parameter type classes

GHC ghc-devs at haskell.org
Thu Jan 8 19:39:55 UTC 2015


#9968: DeriveAnyClass fails on multi-parameter type classes
-------------------------------------+-------------------------------------
              Reporter:  goldfire    |             Owner:
                  Type:  bug         |            Status:  new
              Priority:  normal      |         Milestone:  7.10.1
             Component:  Compiler    |           Version:  7.10.1-rc1
              Keywords:              |  Operating System:  Unknown/Multiple
          Architecture:              |   Type of failure:  None/Unknown
  Unknown/Multiple                   |        Blocked By:
             Test Case:              |   Related Tickets:
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
 When I say

 {{{
 {-# LANGUAGE DeriveAnyClass, MultiParamTypeClasses #-}

 module Bug where

 class C a b
 data X
   deriving (C Int)
 }}}

 and load that into GHCi, I see this:

 {{{
 *Main> :load "/Users/rae/temp/DeriveAny.hs"
 [1 of 1] Compiling Bug              ( /Users/rae/temp/DeriveAny.hs,
 interpreted )
 Var/Type length mismatch:
   [b_a2YW]
   []
 Var/Type length mismatch:
   [b_a2YW]
   []
 Ok, modules loaded: Bug.
 *Bug> :info C
 class C a b     -- Defined at /Users/rae/temp/DeriveAny.hs:5:1
 instance C X -- Defined at /Users/rae/temp/DeriveAny.hs:7:13
 }}}

 It seems my `Int` parameter to `C` is being dropped. I don't believe I
 have a debug build in this example, so that debugging output is shipping.

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


More information about the ghc-tickets mailing list