[project @ 2003-01-13 13:19:25 by simonpj]
authorsimonpj <unknown>
Mon, 13 Jan 2003 13:19:25 +0000 (13:19 +0000)
committersimonpj <unknown>
Mon, 13 Jan 2003 13:19:25 +0000 (13:19 +0000)
commit67398e1b2788237218c6345e2c7509b079b16ceb
tree5a5528fcf5d322f85bb7ca504036dcc57719255a
parent0862ececb9fa3439a0da20076a8b2db0f3ee76a4
[project @ 2003-01-13 13:19:25 by simonpj]
------------------------------------
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.
ghc/compiler/typecheck/TcGenDeriv.lhs