[project @ 2002-11-11 10:53:28 by simonpj]
authorsimonpj <unknown>
Mon, 11 Nov 2002 10:53:29 +0000 (10:53 +0000)
committersimonpj <unknown>
Mon, 11 Nov 2002 10:53:29 +0000 (10:53 +0000)
commit0adb717549e8f6974453eb386350874be601bb03
treef119b510bf122f76f45d390c13242dac988375a0
parent33fec6b1cf3efcc80f4ba9e4f81920fb67bb0beb
[project @ 2002-11-11 10:53:28 by simonpj]
------------------
      Fix a newtype-deriving bug
------------------

The new newtype-deriving mechanism was erroneously using the
*representation type* of the newtype.  The rep type looks through all
ihtermediate newtypes, so that is wrong.  See Note [newtype
representation] in TcDeriv.lhs

deriving/should_run/drvrun013 now tests for this.
ghc/compiler/typecheck/TcDeriv.lhs
ghc/compiler/typecheck/TcEnv.lhs
ghc/compiler/typecheck/TcType.lhs
ghc/compiler/types/TyCon.lhs
ghc/compiler/types/Type.lhs
ghc/compiler/utils/Util.lhs