forgot to say this was with the Linux(i386) version of GHC-5.02.1
(binary release).  Running on a Pentium with Linux 2.4.16 or so.



I am not sure if this is the right place to complain about this, but I
have here something that looks a whole lot like a GHC bug:

I wrote the following:

data Empty a = E
newtype Id a = I a
newtype Pair v w a = P ((v a), (w a))
type Square a = Square_ Empty Id a
data Square_ v w a =
        End (v (v a))
      | Zero (Square_ v (Pair w w) a)
      | One (Square_ (Pair v w) (Pair w w) a) deriving Show

main = print 33

When I compile it with
ghc +RTS -M40m -RTS -v -c square.hs

The compiler halts with the (correct, I think) error message
square.hs:5:
    No instance for `Show (v (v a))'
    When deriving classes for `Square_'

However, when I compile with
ghc +RTS -M40m -RTS -fglasgow-exts -v -c square.hs

the compiler sits and checks types for a long, long time, the runs out
of memory (still in the type checker).

I am using GHC version 5.02.1.

Please CC responses to me, as I am not subscribed to this mailing list.

David Feuer


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

Reply via email to