testsuite: fix tcrun036 build against Prelude/Main 'traverse' clash

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
testsuite: fix T5751 build failure (AMP)

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
testsuite: fix T1735_Help/State.hs build failure (AMP)

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
testsuite: fix seward-space-leak build aganst Prelude/Main 'traverse' clash

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Use correct precedence when printing contexts with class operators

Fixes Trac #9658
Merge branch 'master' of http://git.haskell.org/ghc
Fix a typo in an error message
Remove RAWCPP_FLAGS

Summary:
#9094 mentions to "remove the RAW_CPP bits from the ghc build system because
they're not longer needed", "once the CPP settings ticket is merged #8683"

#8683 was merged with 34f7e9a3c99850859901ca74370f55f1d4e2279a, Phab:D26.

Test Plan: harbormaster

Reviewers: carter, austin

Reviewed By: austin

Subscribers: simonmar, ezyang, carter

Differential Revision: https://phabricator.haskell.org/D240

GHC Trac Issues: #9094
Delete __GLASGOW_HASKELL__ ifdefs for stage0 < 7.6.

Summary:
My understanding is that ghc 7.10 should be buildable with the last 3 versions
of ghc, i.e 7.6, 7.8 and 7.10 itself.

Test Plan: x

Reviewers: austin

Reviewed By: austin

Subscribers: hvr, simonmar, ezyang, carter, thomie

Differential Revision: https://phabricator.haskell.org/D254
Remove unused hashName declaration

Summary:
With the exception of the todo added in 2012, this function has been
untouched since 2007. It is not used anywhere else in GHC, so it appears
to be safe to remove. The accompanying comment refers to hashExpr, which
I couldn't find anywhere in the sources, either.

Test Plan: Removed declaration and export. Compiler built succesfully. No test cases exist to fail, and no other module appears to use it.

Reviewers: thomie, austin

Reviewed By: thomie, austin

Subscribers: simonmar, ezyang, carter, thomie

Differential Revision: https://phabricator.haskell.org/D261
Add support for LINE pragma in template-haskell

Summary:
Provide a way to generate {-# LINE #-} pragmas when generating
Decs in Template Haskell. This allows more meaningful line
numbers to be reported in compile-time errors for dynamically
generated code.

Test Plan: Run test suite

Reviewers: austin, hvr

Reviewed By: austin

Subscribers: hvr, simonmar, ezyang, carter, thomie

Differential Revision: https://phabricator.haskell.org/D299
Fix configure check for 9439 bug

Summary: We should escape path to ghc.On wondows usually ghc comes from HP, which is installed somewhere in "...\Haskell Platform\..." Note space in the middle.

Test Plan: not necessary

Reviewers: rwbarton, hvr, austin

Reviewed By: rwbarton, hvr, austin

Subscribers: rwbarton, simonmar, ezyang, carter, thomie

Projects: #ghc

Differential Revision: https://phabricator.haskell.org/D304
configure in base: add msys to windows check

Summary:
I'm building ghc on windows x86 under msys2, and found that libraries/base/configure isn't able to detect msys as windows platform.

I'm not 100% sure it is the right solution. Probably I have local misconfiguration somewhere. So feel free to reject.

Test Plan: not necessary

Reviewers: austin

Reviewed By: austin

Subscribers: simonmar, ezyang, carter, thomie

Projects: #ghc

Differential Revision: https://phabricator.haskell.org/D305
Clean up and remove todo.

Summary:
The code is equivalent, just formatted nicely and without the
enthusiastic message to clean it up.

Test Plan: None

Reviewers: austin

Reviewed By: austin

Subscribers: simonmar, ezyang, carter, thomie

Differential Revision: https://phabricator.haskell.org/D307
Fix closing parenthesis

Reviewers: rwbarton, austin

Reviewed By: rwbarton, austin

Subscribers: rwbarton, thomie, carter, ezyang, simonmar

Differential Revision: https://phabricator.haskell.org/D309
Make scanl fuse; add scanl'

Summary:
Make scanl a good producer and a good consumer for fold/build
fusion. Add strictly-accumulating scanl', which is required for
Data.List.inits.

Reviewers: nomeata, austin

Reviewed By: austin

Subscribers: spacekitteh, thomie, carter, ezyang, simonmar

Differential Revision: https://phabricator.haskell.org/D314

GHC Trac Issues: #9356
Code size micro-optimizations in the X86 backend

Summary:
Carter Schonwald suggested looking for opportunities to replace
instructions in GHC's output by equivalent ones that are shorter,
as recommended by the Intel optimization manuals.

This patch reduces the module sizes as reported by nofib
by about 1.5% on x86_64.

Test Plan:
Built an i386 cross-compiler and ran the test suite; the same
(rather large) set of tests failed before and after this commit.
Will let Harbormaster validate on x86_64.

Reviewers: austin

Subscribers: thomie, carter, ezyang, simonmar

Differential Revision: https://phabricator.haskell.org/D320
testsuite: T5486 requires integer-gmp internals

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Bump haddock.base perf numbers

We were so close to the max that the test failed if the pathname to
the GHC repository was more than a few dozen characters, causing the
haddock.base test to fail on Phab but not locally.
Use Data.Map.mergeWithKey

Summary: now that we can rely on having containers > 0.5.

Reviewers: austin

Subscribers: thomie, carter, ezyang, simonmar

Differential Revision: https://phabricator.haskell.org/D321