[GHC] #9359: Deriving clause failure with polymorphic kinds

GHC ghc-devs at haskell.org
Thu Jul 24 12:04:23 UTC 2014


#9359: Deriving clause failure with polymorphic kinds
-------------------------------------+-------------------------------------
              Reporter:  simonpj     |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:
             Component:  Compiler    |          Version:  7.8.2
            Resolution:              |         Keywords:
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:              |       Blocked By:
  None/Unknown                       |  Related Tickets:
             Test Case:              |
  deriving/should_compile/T9359      |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
Changes (by simonpj):

 * cc: cheater00@… (added)
 * testcase:   => deriving/should_compile/T9359


Comment:

 Great bug report, thank you.

 For good reasons, processing the `deriving` clause is well separated from
 other processing of the `data instance` declaration.  Making kind
 arguments explicit, the latter gives
 {{{
 data instance CmpInterval * (V (c::*)) Sup = Starting c
 }}}
 that is, this only applies at kind `*`, because the RHS says that `c::*`.

 But when processing the `deriving` clause we were forgetting to kind-check
 the RHS, so we were trying to derive an instance for `Show (CmpInterval k
 (V (c::k)) Sup`; and indeed there isn't one.

 Fix coming.

 Simon

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


More information about the ghc-tickets mailing list