#7278 closed bug (fixed)

nonsensical kind variable ascription causes panic

Reported by: nfrisby Owned by:
Priority: normal Milestone:
Component: Compiler (Type checker) Version: 7.6.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Compile-time crash Difficulty: Unknown
Test Case: polykinds/T7278 Blocked By:
Blocking: Related Tickets:

Description

{-# LANGUAGE TypeFamilies, PolyKinds, MultiParamTypeClasses #-}
 
module GHCBug where

type family TF (t  :: k) :: * -> * -> *

class C (t :: k) (dcs :: * -> * -> *)

f :: (C (t :: k) (TF t)) => TF t p1 p0 -> t p1 p0
f = undefined -- panic caused by (t :: k) in the signature's context

gives

[1 of 1] Compiling GHCBug           ( GHCPanic.hs, interpreted )
ghc: panic! (the 'impossible' happened)
  (GHC version 7.6.1 for x86_64-apple-darwin):
        metaTvRef
<<details unavailable>>

Change History (5)

comment:1 in reply to: ↑ description ; follow-up: Changed 19 months ago by nfrisby

Whoops — submitted too soon. Replacing t :: k with t and adding FlexibleContexts avoids the panic.

comment:2 in reply to: ↑ 1 Changed 19 months ago by nfrisby

Whoops — submitted too soon … again; I wish preview worked on comments.

Replacing t :: k with t in the context in f's signature and adding FlexibleContexts avoids the panic.

comment:3 Changed 19 months ago by simonpj@…

commit 7fdc2a39d5c9a7d1be45b6314d480d16810a75ef

Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Sat Sep 29 13:37:02 2012 +0100

    Add missing case in TcUnify.matchExpectedFunKind
    
    This fixes Trac #7278

 compiler/typecheck/TcUnify.lhs |   27 +++++++++++++++------------
 1 files changed, 15 insertions(+), 12 deletions(-)

comment:4 Changed 19 months ago by simonpj

  • Difficulty set to Unknown
  • Status changed from new to merge
  • Test Case set to polykinds/T7278

This one can merge to 7.6 branch.

Simon

comment:5 Changed 19 months ago by igloo

  • Resolution set to fixed
  • Status changed from merge to closed
Note: See TracTickets for help on using tickets.