[project @ 2003-10-29 18:14:27 by simonpj]
authorsimonpj <unknown>
Wed, 29 Oct 2003 18:14:30 +0000 (18:14 +0000)
committersimonpj <unknown>
Wed, 29 Oct 2003 18:14:30 +0000 (18:14 +0000)
commit7c3d4a1f2b2529ce300b8acc1d26ad98312b9e96
tree8e2b33ce197abb071c7d510c51148808a0798db4
parentd51aa9da8ced82cc4762b6e69fd5f147fb5c7eb8
[project @ 2003-10-29 18:14:27 by simonpj]
Fix a bad consequence of the new story for the generic toT/fromT functions
derived from data types declarations. The problem was that they were being
generated and then discarded by the simplifier, because there was nothing
keeping them alive.

This commit
  * Adds a field tcg_keep to the TcGblEnv, which records things
    to be kept alive;

  * Makes the desugarer pin the keep-alive flag on each binding
    (it's actually a call to setIdLocalExported)

  * Removes that job from updateBinders in SimplCore

It's somewhat tiresome, but not really difficult.
ghc/compiler/deSugar/Desugar.lhs
ghc/compiler/simplCore/SimplCore.lhs
ghc/compiler/specialise/Rules.lhs
ghc/compiler/typecheck/TcDeriv.lhs
ghc/compiler/typecheck/TcInstDcls.lhs
ghc/compiler/typecheck/TcRnMonad.lhs
ghc/compiler/typecheck/TcRnTypes.lhs