Ticket #7601 (closed bug: fixed)

Opened 4 months ago

Last modified 4 months ago

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 Difficulty: Unknown
Test Case: polykinds/T7601 Blocked By:
Blocking: Related Tickets:

Description

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

Changed 4 months ago by simonpj@…

commit 82219ae218ac7e51e6d160cadd16dc030fa9c004

Author: Simon Peyton Jones <simonpj@microsoft.com>
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(-)

Changed 4 months ago by simonpj

  • status changed from new to closed
  • difficulty set to Unknown
  • resolution set to fixed
  • testcase set to polykinds/T7601

Good point. Thanks.

Simon

Note: See TracTickets for help on using tickets.