Making compilation results deterministic (#4012)

Simon Peyton Jones simonpj at microsoft.com
Wed Sep 16 11:18:52 UTC 2015


|  My understanding is that currently, if you build a Haskell project
|  from clean sources with ghc --make, then wipe all the .o/.hi files,
|  and rebuild again from clean, with all the same flags and environment,
|  you are unlikely to end up with identical binaries for either the .o
|  or .hi files

Is that right Bartosz?  If that's the goal, then can we please say that explicitly on the wiki page?

Let's hypothesise that it it's the goal. Then I don't understand why, in a single-threaded GHC, you would get non-det results.  Presumably not from lazy-interface-file-loading.  After all the same things would be loaded in the same order, no?

Before we can propose a solution we need to understand the goal; and having understood the goal we need to understand why the results are non-det right now.   Otherwise we risk fixing the wrong problem.

Anyway, one step at a time :-) Goal first; then a concrete example that demonstrates the problem; then a hypothesis of what is going wrong... 

Simon


More information about the ghc-devs mailing list