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.

Simon

| -----Original Message-----
| From: ghc-devs [mailto:[email protected]] On Behalf Of
| Richard Eisenberg
| Sent: 15 November 2013 14:57
| To: [email protected] 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.
| 
| Thanks,
| Richard
| _______________________________________________
| ghc-devs mailing list
| [email protected]
| http://www.haskell.org/mailman/listinfo/ghc-devs
_______________________________________________
ghc-devs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-devs

Reply via email to