[project @ 2004-11-25 11:36:34 by simonpj]
authorsimonpj <unknown>
Thu, 25 Nov 2004 11:37:19 +0000 (11:37 +0000)
committersimonpj <unknown>
Thu, 25 Nov 2004 11:37:19 +0000 (11:37 +0000)
commit1f7da30204a9b735e8bc543a5bacf03135bcc9c7
tree63eaa9853d823b74dca664025944a3e54229c621
parentc1a7d1a618d86260360e8bde9429e357df95c2de
[project @ 2004-11-25 11:36:34 by simonpj]
------------------------------------------
Keep-alive set and Template Haskell quotes
------------------------------------------

a) Template Haskell quotes should be able to mention top-leve
   things without resorting to lifting.  Example

module Foo( foo ) where
  f x = x
  foo = [| f 4 |]

   Here the reference to 'f' is ok; no need to 'lift' it.
   The relevant changes are in TcExpr.tcId

b) However, we must take care not to discard the binding for f,
   so we add it to the 'keep-alive' set for the module.  I've
   now made this into (another) mutable bucket, tcg_keep,
   in the TcGblEnv

c) That in turn led me to look at the handling of orphan rules;
   as a result I made IdCoreRule into its own data type, which
   has simle but non-local ramifications
21 files changed:
ghc/compiler/basicTypes/Id.lhs
ghc/compiler/basicTypes/Var.lhs
ghc/compiler/coreSyn/CoreFVs.lhs
ghc/compiler/coreSyn/CoreSyn.lhs
ghc/compiler/coreSyn/CoreTidy.lhs
ghc/compiler/coreSyn/PprCore.lhs
ghc/compiler/deSugar/Desugar.lhs
ghc/compiler/deSugar/DsMonad.lhs
ghc/compiler/iface/IfaceSyn.lhs
ghc/compiler/iface/TcIface.lhs
ghc/compiler/main/TidyPgm.lhs
ghc/compiler/simplCore/SimplCore.lhs
ghc/compiler/specialise/Rules.lhs
ghc/compiler/typecheck/TcDeriv.lhs
ghc/compiler/typecheck/TcEnv.lhs
ghc/compiler/typecheck/TcExpr.lhs
ghc/compiler/typecheck/TcInstDcls.lhs
ghc/compiler/typecheck/TcRnDriver.lhs
ghc/compiler/typecheck/TcRnMonad.lhs
ghc/compiler/typecheck/TcRnTypes.lhs
ghc/compiler/typecheck/TcSplice.lhs