Really fix fft2 regression. #9740

Rewrite `take` more aggressively for fusion. Add some more explicit
strictness to `unsafeTake` and `unsafeDrop` that seems to help code size and
allocation just a drop in some nofib tests. They were not previously
strict in their numerical arguments, but always called in contexts where
those had been forced; it didn't make a difference in simple test cases,
but made a small difference for nofib. See #9740.

Differential Revision: https://phabricator.haskell.org/D394
Fixed unused variable warning on mingw32/i686 in rts/Linker.c

The warning was breaking validate.sh runs due to -Wall.

Reviewers: austin

Reviewed By: austin

Subscribers: #ghc_windows_task_force, thomie, carter, simonmar

Differential Revision: https://phabricator.haskell.org/D400
hsc2hs: Update submodule

This makes sure the --cross-compile mode can handle negative enum
values.

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

Signed-off-by: Austin Seipp <austin@well-typed.com>
Convert GHCi sources from .lhs to .hs

Summary: Signed-off-by: Rodlogic <admin@rodlogic.net>

Test Plan: Does it compile?

Reviewers: hvr, austin

Reviewed By: austin

Subscribers: thomie, carter, simonmar

Differential Revision: https://phabricator.haskell.org/D319
Fix #9236 Error on read from closed handle

Summary:
Fixes #9236. My testing indicates that this does *not* lead to problems with
broken pipes and such, but further testing is required. It found
a bug in haddock; I've submitted a pull request upstream.

Reviewers: ekmett, austin

Reviewed By: ekmett, austin

Subscribers: rwbarton, thomie, carter, simonmar

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

GHC Trac Issues: #9236
Use snwprintf instead of swprintf in rts/Linker.c.

Summary:
swprintf has different signatures in mingw32, where it does not include the
buffer size, and in mingw-w64, where it does. That of course breaks the code
as mingw-w64 treats the pointer to the format string as a size_t.

snwprintf is available in both environments and is consistent, so use that
instead.

Reviewers: simonmar, austin

Reviewed By: austin

Subscribers: #ghc_windows_task_force, thomie, carter, simonmar

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

GHC Trac Issues: #9726
Avoid setting -Werror=unused-but-set-variable on Windows.

Summary:
The option is not needed (it was only intended to override Debian's default)
and causes an error if the host ghc's mingw is too old (which the script
does not detect).

Fixes T9727

Reviewers: austin

Reviewed By: austin

Subscribers: thomie, carter, simonmar

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

GHC Trac Issues: #9727
Extra CRs are now filtered out from the source file for :list.

Fixes #9367.

Reviewers: austin

Reviewed By: austin

Subscribers: #ghc_windows_task_force, thomie, carter, simonmar

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

GHC Trac Issues: #9367
Updated stale ghcpkg05.stderr-mingw32.

Looks like the mingw32-specific test was accidentally forgotten after
changing the code and the expected outputs for non OS-specific tests.

Reviewers: austin

Reviewed By: austin

Subscribers: #ghc_windows_task_force, thomie, carter, simonmar

Differential Revision: https://phabricator.haskell.org/D383
Do not use a relative path for echo in tests/ghci/prog013.

Trying to run /usr/bin/echo fails when running tests on Windows,
but using plain "echo" works fine. I think it's fine to assume
the environment is not doing anything particularly funny...

Summary:
...with
echo...

Reviewers: austin

Reviewed By: austin

Subscribers: thomie, carter, simonmar, #ghc_windows_task_force

Differential Revision: https://phabricator.haskell.org/D384
Add __GLASGOW_HASKELL_TH__=YES/NO to CPP definitions

Test Plan: None really.

Reviewers: austin

Reviewed By: austin

Subscribers: thomie, carter, simonmar

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

GHC Trac Issues: #9734
Added mingw32-specific expected stdout files for tests/driver/sigof{01,02,03}

Reviewers: austin

Reviewed By: austin

Subscribers: thomie, carter, simonmar

Differential Revision: https://phabricator.haskell.org/D398
Comments only
Fix test driver python3 compatibility issues

Summary:
Fixes python3 compatibility issues by replacing filter with a list
comperhension and a potential issue with python2 when override_flags
would be an empty list.

Reviewers: austin, thomie

Reviewed By: austin, thomie

Subscribers: thomie, carter, simonmar, mlen

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

GHC Trac Issues: #9230
Add notes on change to hGetContents semantics

Summary:
Additionally, move Unicode 7.0 update notice from the compiler
section to the base libraries section.

Reviewers: austin

Reviewed By: austin

Subscribers: thomie, carter, simonmar

Projects: #ghc

Differential Revision: https://phabricator.haskell.org/D401
Fixed missing trailing newline bug in pretty printer

Summary:
Pretty printer didn't produce trailing newline in strings in error
messages.

Reviewers: simonpj, austin

Reviewed By: austin

Subscribers: thomie, carter, simonmar, mlen

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

GHC Trac Issues: #9681
Updated testsuite/.gitignore to exclude some test artifacts on Windows.

Reviewers: austin

Reviewed By: austin

Subscribers: thomie, carter, simonmar

Differential Revision: https://phabricator.haskell.org/D404
Drop deprecated `OverlappingInstances` from base

With #9242 the `OverlappingInstances` extension got deprecated, this
commit adapts the only two remaining places in `base` where it was still
used.

Starting with this commit, the `Typeable (s t)` instance (which seemingly
was the motivation for using `OverlappingInstances` in the first place
when `Typeable` was neither polykinded nor auto-derived-only, see also
commit ce3fd0e02826367e6134a3362d8d37aa114236f5 which introduced
overlapping instances) does no longer allow overlapping instances, and
there doesn't seem to be any good reason to keep allowing overlapping
instance now.

This also removes redundant `LANGUAGE`/`OPTIONS_GHC` pragmas from
`Data.Typeable` and refactors the language pragmas into more uniform
single-line pragmas.

Reviewed By: austin

Differential Revision: https://phabricator.haskell.org/D377
Fix comment typos
Add doctest examples for Data.Char

This adds doctest examples for every function and data type in `Data.Char`.

Reviewed By: austin, hvr

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