Choose external names more predictably
authorSimon Marlow <marlowsd@gmail.com>
Mon, 20 Jul 2009 14:47:51 +0000 (14:47 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Mon, 20 Jul 2009 14:47:51 +0000 (14:47 +0000)
commitfa9f1e20691ca55ddf83f568497d4ed7ed754ba8
treed5f1fcd98f4f3c285c4e1b93d69c241452ff7fad
parenta8457632b7206c164b948fa908e63f5b9ac58cbf
Choose external names more predictably

Now, for a compiler-generated binding "x", if "x" is referred to by
the exported "f", then it will be named "f_x" rather than something
like "x23".  This means that hopefully

  - compilation will more often product the same results given the
    same input (the choice of names is not dependent on the
    non-deterministic order of bindings within the compiler).

  - less recompilation will be necessary after making changes

  - navigating Core might be a bit easier.

unfortunately, compilation with -O still does not consistently produce
the same ABI.  The simplifier sometimes does different things,
apparently.

Names will be longer, but I can't see a way around that.
compiler/main/TidyPgm.lhs