Opened 3 years ago

Closed 3 years ago

#7601 closed bug (fixed)

Internal error with kind annotation on associated type family

Reported by: dreixel Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.7
Keywords: polykinds Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: polykinds/T7601
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


The following module:

{-# LANGUAGE PolyKinds              #-}
{-# LANGUAGE TypeFamilies           #-}

module Bug where

class C (a :: k) where
  type F (a :: k)

Makes GHC raise an internal error:

    GHC internal error: `k' is not in scope during type checking, but it passed the renamer
    tcl_env of environment: [(reB,
                              AThing forall (k :: BOX). k -> Constraint),
                             (reC, AThing forall (k :: BOX) (k :: BOX). k -> k)]
    In the kind `k'
    In the class declaration for `C'

Change History (2)

comment:1 Changed 3 years ago by simonpj@…

commit 82219ae218ac7e51e6d160cadd16dc030fa9c004

Author: Simon Peyton Jones <[email protected]>
Date:   Fri Jan 25 13:20:37 2013 +0000

    The type/kind variables of a class decl scope over the associated types
    Fixes Trac #7601

 compiler/typecheck/TcTyClsDecls.lhs |   67 +++++++++++++++--------------------
 1 files changed, 29 insertions(+), 38 deletions(-)

comment:2 Changed 3 years ago by simonpj

  • difficulty set to Unknown
  • Resolution set to fixed
  • Status changed from new to closed
  • Test Case set to polykinds/T7601

Good point. Thanks.


Note: See TracTickets for help on using tickets.