I'm aware that unique names are unique in a GHC invocation. But my statements sill holds.
On Fri, Nov 30, 2018 at 7:20 PM Ben Gamari <[email protected]> wrote: > Csaba Hruska <[email protected]> writes: > > > Hi Ben, > > > > I thought that it is possible to rely on unique values *in case of non > > exported Ids* because they are local to a specific module and can not > > appear in expressions in other modules because they are not exported. > > Do I miss something? > > > Uniques should be treated as being non-reproducible across compiler > sessions. > > To make this more concrete: if GHC compiles the same module twice it > will not necessarily assign the same uniques to the module's Names. > Uniques are derived from local UniqSupplies conjured up at a variety of > points in the compilation pipeline (search from mkSplitUniqSupply). > > These supplies are themselves derived from an impure global counter (see > compiler/cbits/genSym.c). The state of this counter (and consequently > the uniques derived from it) should be treated as being entirely > unpredictable. > > Cheers, > > - Ben >
_______________________________________________ ghc-devs mailing list [email protected] http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
