ghc-6.4.1: panic - Prelude.last: empty list

Hello I am having problems with GHC 6.4.1 dying with the message: ghc-6.4.1: panic! (the `impossible' happened, GHC version 6.4.1): Prelude.last: empty list The source is nontrivial and contains template haskell. The error seems to appear after byte code generation. The log of the compile with -v9 is at the address below: http://cs.helsinki.fi/u/ekarttun/haskell/log.txt Is there anything else I should do to isolate the error better? - Einar Karttunen

Hello Einar, Sunday, October 30, 2005, 4:20:20 PM, you wrote: EK> I am having problems with GHC 6.4.1 dying with the message: EK> ghc-6.4.1: panic! (the `impossible' happened, GHC version 6.4.1): EK> Prelude.last: empty list EK> The source is nontrivial and contains template haskell. The error EK> seems to appear after byte code generation. are you will be glad to see trivial source of this problem? :) {-# OPTIONS_GHC -fglasgow-exts -fth #-} module Main where main = return () $( [d| |] >>= return.tail) C:\!\Haskell\!!!!>ghc --make -ddump-splices test-derive.hs Chasing modules from: test-derive.hs Compiling Main ( test-derive.hs, test-derive.o ) Loading package base-1.0 ... linking ... done. Loading package haskell98-1.0 ... linking ... done. Loading package template-haskell-1.0 ... linking ... done. ghc.EXE: panic! (the `impossible' happened, GHC version 6.4.1): Prelude.tail: empty list Please report it as a compiler bug to glasgow-haskell-bugs@haskell.org, or http://sourceforge.net/projects/ghc/. as you see, TH sometimes just don't caught exceptions in your TH code. moreover, with -ddump-splices TH can print code it generated and only then panic on error in generation routine! -- Best regards, Bulat mailto:bulatz@HotPOP.com
participants (2)
-
Bulat Ziganshin
-
Einar Karttunen