Remove redundant cmmMakeDynamicReference' wrapper
Refactor cmmMakeDynamicReference

It now has its own class, and the addImport function is defined in that
class, rather than needing to be passed as an argument.
Use NatM_State record fields, rather than matching/constructing the whole type
Make the current module available to labelDynamic

It doesn't actually use it yet
Simplify ghc-cabal

It now consistently takes directory and distDirectory as its first 2
arguments. Also, it only supports configuring 1 package at a time now
(we weren't using the ability to configure more than one at once).
Fix the GHC package DLL-splitting

There's now an internal -dll-split flag, which we use to tell GHC how
the GHC package is split into 2 separate DLLs. This is used by
Packages.isDllName to determine whether a call is within the same
DLL, or whether it is a call to another DLL.
Merge branch 'master' of http://darcs.haskell.org/ghc
Fix ghci on Windows when GHC is dynamically linked

On Windows, we need to prepend "lib" to Haskell DLLs.
(maybe we should be naming the DLLs without the prefix instead? But this
works for now).
Stop excluding the dyn way for the dph packages on Windows

Now that we can build the GHC package the dyn way, there's no need
to exclude them.
Define the right RTS config in the Windows dyn wrapper programs

This is particularly important as without it validate fails, as it
tries to pass RTS options to haddock, and with the default RTS config
those options aren't permitted.
Link to the right RTS whenever we build a .dll on Windows

When GHCi makes temporary DLLs, those also need to be linked against
the right RTS, or we won't be able to load them.
SpecConstr: seed specialisation of top-level bindings, as with letrecs.

When specialising a top-level recursive group, if none of the binders
are exported then we can start specialising based on the later calls to
the functions.
This is instead of creating specialisations based on the RHS of the
bindings.
The main benefit of this is that only specialisations that will actually
be used are created. This saves quite a bit of memory when compiling
stream-fusion and ForceSpecConstr sort of code.

Nofib has an average allocation and runtime of -0.7%, maximum 2%.
There are a few with significant decreases in allocation (10 - 20%)
but, interestingly, those ones seem to have similar runtimes.
One of these does have a significantly reduced total elapsed time
though: -38%.

On average the nofib compilation times are the same, but they do vary
with s.d. of -4 to 4%.
I think this is acceptable because of the fairly major code blowup fixes
this has for fusion-style code.
(In one example, a SpecConstr was previously producing 122,000 term size,
now only produces 28,000 with the same object code)
Comments only
Make 'undefined' have the magical type 'forall (a:OpenKind).a'

This fixes Trac #7888, where the user wanted to use 'undefined' in a
context that needed ((forall a. a->a) -> Int).  We allow OpenKind
unification variables to be instantiate with polytypes (or unboxed
types), hence the change.

'error' has always been like this; this change simply extends
the special treatment to 'undefined'.  It's still magical;
you can't define your own wrapper for 'error' and get the
same behaviour.  Really just a convenience hack.
Make splitHsAppTys look through parentheses, fixing Trac #7903

This was really just an oversight from long ago.
Improve pretty-printing of inline-family pragmas; fixes Trac #7906
Fix typechecking of pattern bindings that have type signatures (Trac #7268)

Pattern bindings are jolly tricky to typecheck, especially if there are
also type signatures involved.  Trac #7268 pointed out that I'd got it
wrong; this fixes it.  See Note [Typing patterns in pattern bindings] in TcPat.
Comments only
Make reifyInstances expand type synonyms robustly (Trac #7910)
Don't try to build bindist wrappers on Windows