[project @ 2001-08-23 08:43:30 by simonpj]
authorsimonpj <unknown>
Thu, 23 Aug 2001 08:43:30 +0000 (08:43 +0000)
committersimonpj <unknown>
Thu, 23 Aug 2001 08:43:30 +0000 (08:43 +0000)
commitde568761513c59bef17bb3bf2285f6c9d457bddf
treeed22668dbb2a5c3981b79cdcba62fa6489cc83fe
parentb10453960968ee8fc39fb6bf371d466e3e7aedaf
[project @ 2001-08-23 08:43:30 by simonpj]
-----------------------------------
Correct a horrible error in repType
-----------------------------------

repType is meant to give the underlying representation of a type.
But it wasn't taking account of the fact that *recursive* newtypes are
still represented by a TyConApp.  (Non-recursive ones behave much more
like type synonyms now.)

As a result, if we have

newtype F = F (F->F)

then Bad Things happen if we try to seq x::F.  We decide whether to
push an ordinary return address or a SEQ frame based on the type,
and repType didn't expose the fact that F is represented by a function type.

Aargh. codeGen/should_run/cg050 now tests for this.
ghc/compiler/types/Type.lhs