simonpj at microsoft.com
Tue Nov 19 10:58:30 UTC 2013
Uniques are only fixed per-run of the compiler.
So when DsMeta (which uses those Names) runs, it generates Core with Names in it (e.g. Language.Hasekell.TH.Syntax.returnQ. When we go to Language/Hasekell/TH/Syntax.hi interface file, and read it in, we'd better use the same unique for return that DsMeta generated. But DsMeta only runs in stage2.
So I think it's fine.
| -----Original Message-----
| From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of
| Richard Eisenberg
| Sent: 15 November 2013 14:57
| To: ghc-devs at haskell.org Devs
| Subject: templateHaskellNames
| Hi devs,
| I happened to be looking through the code dealing with known names, and
| I'm a little confused about templateHaskellNames. In particular, I'm
| confused why it's included in knownKeyNames only when GHCI is defined.
| (See lines 196-198 of HscMain.) It's the stage 1 compiler that compiles
| the TH library, when the known key names are so important. Couldn't this
| cause very strange behavior if some of the numbers are changed? Or, am I
| misunderstanding something here?
| This is certainly a minor problem, but it could give someone down the
| road a headache if it were to happen.
| ghc-devs mailing list
| ghc-devs at haskell.org
More information about the ghc-devs