-
Simon Peyton Jones authored
------------------------------------------ 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
1f7da302