Break loop in interface typechecking (fixes Trac #8002)
Tidy up the segmentation of mdo expressions

When we changed 'rec' to *not* do segmentation of any kind,
I did it by meddling with the inner loop of grab in glomSegments.
But that is really hard to understand!

This patch lifts the test out to the top where is is clear.
Make sure that Pretty.text is inlined in stage 0,
so that RULE text/str gets a chance to fire (Trac #7995).

And make sure that Outputable.text is inlined, so that the underlying
Pretty.text rule can fire.

The thing is that literal strings only turn into unpackCString#
in phase 1.
Allow associated types as sub-names in an import list (Trac #8011)
White space and ordering only
Update the package database directory's timestamps when rebuilding the package cache.

I was seeing many "WARNING: cache is out of date" errors during validation
claiming that my package cache was out of date. This patch eliminates those
errors by ensuring that when we rebuild the package cache, the modification time
of the directory containing the package database is set to be the same as the
modification time of the cache.
Further fixes in RnNames, to make associated type exports work

You ought to be able to say

  module M( C( T, foo ) where
    class C a where
      type T a
      foo :: a -> T a

i.e. with T in C's sub-item list.  This makes it so.
Document -XTypeOperators, which had escaped documentation altogether thus far
Make noteMustPointToIt true of all non-top-level thunks

See Note [GC recovery].  To come: clean-up of StgCmmBind.cgRhs.
Fix typos
Improve "No data constructor has all these fields" message (#7989)
Comments for Trac #7989
Rework LLVM metadata representation to be more accurate.
Add ability to call functions with metadata as arguments to LLVM
backend.
Iteration on dterei's metadata design

- MetaArgs is not needed, as variables are already meta data

- Same goes for MetaVal - its only reason for existing seems to be to
  support LLVM's strange pretty-printing for meta-data annotations, and
  I feel that is better to keep the data structure clean and handle it in
  the pretty-printing instead.

- Rename "MetaData" to "MetaAnnot". Meta-data is still meta-data when it
  is not associated with an expression or statement - for example compile
  unit data for debugging. I feel the old name was a bit misleading.

- Make the renamed MetaAnnot a proper data type instead of a type alias
  for a pair.

- Rename "MetaExpr" constructor to "MetaStruct". As the data is much more
  like a LLVM structure (not array, as it can contain values).

- Fix a warning
Use SDoc for all LLVM pretty-printing

This patch reworks some parts of the LLVM pretty-printing code that were
still using Show and String. Now we should be using SDoc and Outputable
throughout. Note that many get*Name functions become pp*Name
here as a side-effect.
Extend globals to aliases

Also give them a proper constructor - getGlobalVar and getGlobalValue
map directly to the accessors.
Rewrite ppLlvmBlock to use standard library "break"
Use full contents size for arrays

I am not quite sure at what point it makes sense to look at arrays as
pointers, but I ran into at least one use case that strongly suggested
doing it this way (calculating the actual size of structures, to be exact).
Major Llvm refactoring

This combined patch reworks the LLVM backend in a number of ways:

1. Most prominently, we introduce a LlvmM monad carrying the contents of
   the old LlvmEnv around. This patch completely removes LlvmEnv and
   refactors towards standard library monad combinators wherever possible.

2. Support for streaming - we can now generate chunks of Llvm for Cmm as
   it comes in. This might improve our speed.

3. To allow streaming, we need a more flexible way to handle forward
   references. The solution (getGlobalPtr) unifies LlvmCodeGen.Data
   and getHsFunc as well.

4. Skip alloca-allocation for registers that are actually never written.
   LLVM will automatically eliminate these, but output is smaller and
   friendlier to human eyes this way.

5. We use LlvmM to collect references for llvm.used. This allows places
   other than cmmProcLlvmGens to generate entries.