Minor impovement to when we float a let out of
a right-hand side:

Note [Float when cheap or expandable]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We want to float a let from a let if the residual RHS is
   a) cheap, such as (\x. blah)
   b) expandable, such as (f b) if f is CONLIKE
But there are
  - cheap things that are not expandable (eg \x. expensive)
  - expandable things that are not cheap (eg (f b) where b is CONLIKE)
so we must take the 'or' of the two.
Print infix type constructors in back-ticks

Fixes Trac #7609
Introduce CPR for sum types (Trac #5075)

The main payload of this patch is to extend CPR so that it
detects when a function always returns a result constructed
with the *same* constructor, even if the constructor comes from
a sum type.  This doesn't matter very often, but it does improve
some things (results below).

Binary sizes increase a little bit, I think because there are more
wrappers.  This with -split-objs.  Without split-ojbs binary sizes
increased by 6% even for HelloWorld.hs.  It's hard to see exactly why,
but I think it was because System.Posix.Types.o got included in the
linked binary, whereas it didn't before.

        Program           Size    Allocs   Runtime   Elapsed  TotalMem
          fluid          +1.8%     -0.3%      0.01      0.01     +0.0%
            tak          +2.2%     -0.2%      0.02      0.02     +0.0%
           ansi          +1.7%     -0.3%      0.00      0.00     +0.0%
      cacheprof          +1.6%     -0.3%     +0.6%     +0.5%     +1.4%
        parstof          +1.4%     -4.4%      0.00      0.00     +0.0%
        reptile          +2.0%     +0.3%      0.02      0.02     +0.0%
----------------------------------------------------------------------
            Min          +1.1%     -4.4%     -4.7%     -4.7%    -15.0%
            Max          +2.3%     +0.3%     +8.3%     +9.4%    +50.0%
 Geometric Mean          +1.9%     -0.1%     +0.6%     +0.7%     +0.3%

Other things in this commit
~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Got rid of the Lattice class in Demand

* Refactored the way that products and newtypes are
  decomposed (no change in functionality)
Comments only
Use fsep, not sep, when printing lots of Core binders
Comments only
Merge branch 'master' of http://darcs.haskell.org/ghc
Remove unused argument
Comments only
The type/kind variables of a class decl scope over the associated types

Fixes Trac #7601
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc
Collapse DmdResult into CPRResult

There was no gain from PureResult; the CPRResult component
needs a BotCPR value anyhow, so it was simply duplicate computation.
Merge branch 'master' of http://darcs.haskell.org/ghc

Conflicts:
	compiler/basicTypes/DataCon.lhs
Remove dead code
Add support to compare for comparing whole directories
Use Test.Regex.PCRE instead of .Posix in compare

This program:

    main :: IO ()
    main = do re "[^ ]" "\207"
              re "[ ]" "\207"
              re " " "\207"

    re :: String -> String -> IO ()
    re r str = let r' = makeRegex r :: Regex
                   res = matchM r' str :: Maybe (String, String, String, [String])
               in print res

prints

    Nothing
    Nothing
    Nothing

for me with Posix, but

    Just ("","\207","",[])
    Nothing
    Nothing

with PCRE. This was causing compare to fail with

    Tar line doesn't parse: "drwxrwxr-x simonmar/GHC       0 2012-12-08 21:35 ghc-7.6.1.20121207/libraries/haskeline/tests/dummy-\206\188\206\177\207\\302\\203/"

on the GHC source tarball.
Add a kludge to the compare tool for unicode filenames

It thought that something impossible was happening when they
were involved.
Add a "Done." line to compare

Makes it clearer whether it succeeded when redirecting output
use -e rather than -d when checking for the existence of a subrepo

The .git file in a submodule's root directory is not necessarily a
directory, as is the case for the 'time' submodule.

This fixes #7577, where some './sync-all' operations don't detect
that the 'time' submodule is present in the repository.
Fix documentation bug: TSOs are *not* unconditionally kept on the mutable list.

The bug where TSOs were unconditionally kept on the mutable list was #1589
which was fixed in 04cddd339c000df6d02c90ce59dbffa58d2fe166.
Curiously enough, the commit that changed this comment
0417404f5d1230c9d291ea9f73e2831121c8ec99 occurred *after* this
change was made; I can only assume Simon Marlow accidentally forgot
that he had fixed this bug. :-)

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>