Note [Unique Determinism]
The order of allocated @Uniques@ is not stable across rebuilds. The main reason for that is that typechecking interface files pulls @Uniques@ from @UniqSupply@ and the interface file for the module being currently compiled can, but doesn't have to exist. It gets more complicated if you take into account that the interface files are loaded lazily and that building multiple files at once has to work for any subset of interface files present. When you add parallelism this makes @Uniques@ hopelessly random. As such, to get deterministic builds, the order of the allocated @Uniques@ should not affect the final result. see also wiki/deterministic-builds
References 0
This Note does not link to any other.
Referenced by 15
- GHC.Core.ConLike call site
- GHC.Core.Make call site
- GHC.Core.Opt.SetLevels call site
- GHC.Core.Opt.SpecConstr call site
- GHC.Core.Opt.WorkWrap.Utils call site
- nonDetCmpType nondeterminism GHC.Core.TyCo.Compare
- GHC.HsToCore.Foreign.C call site
- GHC.HsToCore.Foreign.JavaScript call site
- Object determinism GHC.StgToCmm
- GHC.Types.Unique call site
- No Ord for Unique GHC.Types.Unique
- Deterministic UniqFM GHC.Types.Unique.DFM
- GHC.Types.Unique.DFM call site
- GHC.Types.Var call site
- ModuleEnv performance and determinism GHC.Unit.Module.Env