simonpj 2003/01/13 05:19:29 PST
Modified files:
ghc/compiler/typecheck TcGenDeriv.lhs
Log:
------------------------------------
Type signature for derived con2tag
------------------------------------
MERGE TO STABLE
The derived con2tag didn't have a type signature, so we got
con2tagFoo :: a -> Int#
con2tagFoo = \x -> getTag x
The getTag generates a case expression, so we get a polymorphic
case. The polymorphic case simply does not work in *interpreted*
GHC 5.02.3 and as a result neither does con2tag. Alas.
This commit fixes the problem, by giving a type signature for
con2TagFoo. But note that getTag in interpreted GHC 5.02 will continue
to fail if used in a polymorphic context. This problem does not arise
in the HEAD (eval/apply) so I'm going to leave it as a wont-fix bug.
Revision Changes Path
1.91 +20 -5 fptools/ghc/compiler/typecheck/TcGenDeriv.lhs
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc