Opened 11 years ago

Closed 11 years ago

Last modified 4 years ago

#1153 closed merge (fixed)

panic! "expectJust zonkSigTyVar" while compiling

Reported by: shahn Owned by: simonpj
Priority: normal Milestone:
Component: Compiler Version: 6.6
Keywords: Cc:
Operating System: Linux Architecture: x86
Type of failure: None/Unknown Test Case: tcfail175
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


GHC is panicing while compiling the attached Programm:

shahn@habana:~/dir$ ghc --make GHCBUG.hs
[1 of 1] Compiling Main             ( GHCBUG.hs, GHCBUG.o )
ghc-6.6: panic! (the 'impossible' happened)
  (GHC version 6.6 for i386-unknown-linux):
        expectJust zonkSigTyVar

Please report this as a GHC bug:

Distibution: Kubuntu Edgy Eft

uname -a : Linux habana 2.6.17-11-generic #2 SMP Thu Feb 1 19:52:28 UTC 2007 i686 GNU/Linux


    Cabal-, FilePath-0.1.0, HAppS-0.8.4, HGL-3.1, HSFFIG-1.1,
    HTTP-2006.7.7, HUnit-1.1, HaXml-1.13.2, OpenGL-2.1, QuickCheck-1.0,
    X11-1.1, base-2.0, cairo-, cgi-2006.9.6, fgl-5.2,
    (ghc-6.6), glade-, glib-, gtk-,
    haskell-src-1.0, haskell98-1.0, html-1.0, hxt-7.0, mtl-1.0,
    network-2.0, parsec-2.0, rdtsc-1.1.1, readline-1.0,
    regex-base-0.71, regex-compat-0.71, regex-posix-0.71, rts-1.0,
    soegtk-, stm-2.0, template-haskell-2.0, time-1.0, unix-1.0,

gcc -v:

Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)

the program (GHCBUG.hs) :

module Main where

import Test.HUnit
import Data.Map as M
import Data.Maybe

data Term =
    | BOTTOM
    | Lam Term Term
    | App Term Term
    | ITEF Term Term
    | Var String
    | Free String
    | Id String
    | Con String deriving (Show, Eq)

type Program = Map String Term

program = insert "main" (Con "huhu") empty

-- Evaluiert das Programm im 0-ten Universum
evalMain m = (eval 0 m [] "main" m) ! "main"

-- Evaluiert das gegebene Programm im n-ten Universum
eval :: Int -> Program -> [String] -> String -> Program -> Program
eval 0 root checking actual m = evalRHS 0 root checking actual (m ! actual)

evalRHS :: Int -> a
evalRHS 0 root checking actual (Con s) = insert actual (Con s) root
evalRHS 0 root checking actual (Id id) =
    eval 0 root checking actual (
        insert actual (root ! id) root)

-- Tests:
p01 = fromList [("main", (Con "huhu"))]
t01 = TestCase (assertEqual "" (Con "huhu") (evalMain p01))

p02 = fromList [("main", (Id "foo")), ("foo", (Con "hu"))]
t02 = TestCase (assertEqual "" (Con "hu") (evalMain p02))

tests = TestList [t01, t02]

main = runTestTT tests

The line

evalRHS :: Int -> a

seems to cause the trouble.

Change History (5)

comment:1 Changed 11 years ago by simonpj

Owner: set to simonpj
Test Case: tcfail175

I'll take this.

comment:2 Changed 11 years ago by simonpj

Resolution: fixed
Status: newclosed
Type: bugmerge

Fixed. Please merge to stable branch.

Mon Feb 19 17:52:48 GMT 2007 simonpj@…

  • Signature type variables must not be instantiated with tycons


comment:3 Changed 11 years ago by simonpj

Resolution: fixed
Status: closedreopened

Oops. I shouldn't close this until it's been merged.

comment:4 Changed 11 years ago by igloo

Resolution: fixed
Status: reopenedclosed


comment:5 Changed 4 years ago by simonpj <simonpj@…>

In 0e209896342e408b56437c88b3141bfcb26fd5bd/ghc:

Add test for Trac #1153
Note: See TracTickets for help on using tickets.