The following (admittedly rather small :-) fragment from Manuel's
GTK+-binding fails to compile with ghc-4.02:

---------- Foo.hs ----------------------------------------------
module Foo where
data Bar = Baz deriving Enum
----------------------------------------------------------------
panne@liesl:~ > ghc -c Foo.hs

panic! (the `impossible' happened):
        tcLookupValue: PrelBase.zg{-rRR,j-}

Please report it as a compiler bug to [EMAIL PROTECTED]
----------------------------------------------------------------

Using -O is even more confusing:

----------------------------------------------------------------
panne@liesl:~ > ghc -c Foo.hs -O
Foo.hs:2:
    No instance for `Ord Int' arising from use of `>=' at Foo.hs:2

Foo.hs:2:
    No instance for `Ord Bar' arising from use of `>' at Foo.hs:2
----------------------------------------------------------------

The problems vanish if 'deriving Enum' is replaced with 'deriving
(Eq,Ord,Enum)'. An old ghc-3.02 works, too.

Cheers,
   Sven
-- 
Sven Panne                                        Tel.: +49/89/2178-2235
LMU, Institut fuer Informatik                     FAX : +49/89/2178-2211
LFE Programmier- und Modellierungssprachen              Oettingenstr. 67
mailto:[EMAIL PROTECTED]            D-80538 Muenchen
http://www.pms.informatik.uni-muenchen.de/mitarbeiter/panne

Reply via email to