#1153: panic! "expectJust zonkSigTyVar" while compiling
-------------------------+--------------------------------------------------
    Reporter:  shahn     |       Owner:       
        Type:  bug       |      Status:  new  
    Priority:  normal    |   Milestone:       
   Component:  Compiler  |     Version:  6.6  
    Severity:  normal    |    Keywords:       
  Difficulty:  Unknown   |    Testcase:       
Architecture:  x86       |          Os:  Linux
-------------------------+--------------------------------------------------
GHC is panicing while compiling the attached Programm:

 {{{
 [EMAIL PROTECTED]:~/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:  http://www.haskell.org/ghc/reportabug
 }}}


 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

 ghc-pkg:

 {{{
 /usr/local/lib/ghc-6.6/package.conf:
     Cabal-1.1.6.1, 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-0.9.10.2, cgi-2006.9.6, fgl-5.2,
     (ghc-6.6), glade-0.9.10.2, glib-0.9.10.2, gtk-0.9.10.2,
     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-0.9.10.2, stm-2.0, template-haskell-2.0, time-1.0, unix-1.0,
     xhtml-2006.9.13
 /home/shahn/.ghc/i386-linux-6.6/package.conf:
     harpy-0.1
 }}}


 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 =
       Top
     | 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.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1153>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to