Opened 4 years ago

Closed 4 years ago

#8557 closed bug (fixed)

Panic "tcTyVarDetails" when :forcing a kind-polymorphic data family instance

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


I have

{-# LANGUAGE TypeFamilies, DataKinds, PolyKinds #-}

data family Sing (a :: k)
data instance Sing (a :: [k]) = SNil
x :: Sing '[]
x = SNil

When I load into GHCi and tried to force x, this happened:

*Main> :force x
ghc: panic! (the 'impossible' happened)
  (GHC version 7.7.20131031 for x86_64-apple-darwin):
	tcTyVarDetails k{tv a3Gv} [tv]

This was tested on the build from Oct 31 -- apologies if it has since been fixed. If I make the [k] in the instance declaration k, the file compiles fine.

Change History (3)

comment:1 Changed 4 years ago by Simon Peyton Jones <simonpj@…>

In a8ac471d435214dbdc1fa70f938c63128993a1db/ghc:

Fix the deugger (fixing Trac #8557)

The runtime debugger (which has not received any love from anyone
for many years) looks wrong to me; it was failing to instantiate the
outer foralls of a variable when called from :force, which calls
cvObtainTermFromId, which calls cvObtainTerm

I simplified the code too.  But I'm flaky on how this debugger stuff
is really supposed to work, so I'm partly guessing.  Tests pass though.

comment:2 Changed 4 years ago by Simon Peyton Jones <simonpj@…>

comment:3 Changed 4 years ago by simonpj

Resolution: fixed
Status: newclosed
Test Case: ghci.debugger/scripts/T8557
Note: See TracTickets for help on using tickets.