Yes, we know about this one.  It'll be fixed in the upcoming patch
release.
Thanks for reporting it.

Workaround: expand type synonyms in data type and class decls.

Simon

| -----Original Message-----
| From: Louis Madon [mailto:[EMAIL PROTECTED]] 
| Sent: 05 May 2001 01:37
| To: [EMAIL PROTECTED]
| Subject: ghc 5.00 - panic! type def causes <<loop>>
| 
| 
| The following code snippet duplicates a problem I'm getting 
| with the new compiler.  Previous versions (ghc 4.08.x) and 
| Hugs do not have the problem:
| 
| 
| module Bug
|   where
| 
| class CExpr c where
|   count :: TEnv c -> Int
| 
| data CExpr c => Expr c = Subexpr [Expr c] | Constant Char
| 
| data CExpr c => Env c = EnvData c
| 
| type TEnv c = Env c
| 
| 
| 
| 
| Attempting to compile the above code causes the following error:
| 
|     ghc-5.00: panic! (the `impossible' happened, GHC version 5.00):
|      <<loop>>
| 
|     Please report it as a compiler bug to 
| [EMAIL PROTECTED],
|     or http://sourceforge.net/projects/ghc/.
| 
| 
| 
| If I expand out the use of TEnv and just use Env directly the 
| problem goes away.  For the above example this is no problem, 
| but in my real code it would be nice to not have to do this 
| as the type has to be expanded out in quite a few places and 
| the rhs is much more complex.
| 
| 
| I'm running ghc 5 on FreeBSD 3.2 with gcc 2.7.2.1
| 
| Here's a typescript of the compile session:
| 
| 
| Script started on Sat May  5 10:14:53 2001
| sh-2.03$ ghc -v -c Bug.hs
| Glasgow Haskell Compiler, Version 5.00, for Haskell 98, 
| compiled by GHC version 5.00 Using package config file: 
| /usr/local/lib/ghc-5.00/package.conf
| Hsc static
| flags: -static -fignore-interface-pragmas 
| -fomit-interface-pragmas -fdo-lamb da-eta-expansion -flet-no-escape
| *** Ineffective C pre-processor
| echo '{-# LINE 1 "Bug.hs" #-}' > /tmp/ghc51808.hspp && cat 
| Bug.hs >> /tmp/ghc51808.hspp
| 
| *** Checking old interface for hs = Just "Bug.hs", hspp = Just
| "/tmp/ghc51808.hspp":
| Compiling Bug              ( Bug.hs, Bug.o )
| *** Parser:
| *** Renamer:
| *** Typechecker:
| Removing: /tmp/ghc51808.s
| Warning: can't remove tmp file /tmp/ghc51808.s
| Removing: /tmp/ghc51808.hspp
| ghc-5.00: panic! (the `impossible' happened, GHC version 
| 5.00):  <<loop>>
| 
| Please report it as a compiler bug to 
| [EMAIL PROTECTED], or 
| http://sourceforge.net/projects/ghc/.
| 
| sh-2.03$ exit
| exit
| 
| 
| Script done on Sat May  5 10:15:08 2001
| 
| 
| 
| _______________________________________________
| Glasgow-haskell-bugs mailing list 
| [EMAIL PROTECTED] 
| http://www.haskell.org/mailman/listinfo/glasgow-| haskell-bugs
| 

_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to