Fix ffi023
Whitespace only
Outputable instance for IfaceVectInfo
Add missing semicolon in Schedule.c

I think this went wrong in 2a6f193b
base: Fix (**) instance for Data.Complex (#8539)

Reviewed-by: Edward Kmett <ekmett@gmail.com>
Authored-by: Yalas, Scott Turner

Signed-off-by: Austin Seipp <austin@well-typed.com>
Update comment about C helper for foreign exports (#9713)

Signed-off-by: Austin Seipp <austin@well-typed.com>
Fix usage of `find -perm` in aclocal.m4 (#9697)

Signed-off-by: Austin Seipp <austin@well-typed.com>
mapMaybe: Typo in the comment (#9644)

Signed-off-by: Austin Seipp <austin@well-typed.com>
Disable AVX for LLVM 3.2 by default (#9391)

Due to a bug LLVM generates a C-like frame pointer prelude for functions
that use AVX instructions. This causes programs using the GHC calling
convention to crash, therefore we simply disable them. People that want
to use AVX should consider upgrading to a more current LLVM version.

Signed-off-by: Austin Seipp <austin@well-typed.com>
Fix detection of GNU gold linker if invoked via gcc with parameters

Previously the linker was called without any commandline parameters to
detect whether bfd or gold is used. However the -fuse-ld parameter can
be used to switch between gold and bfd and should be taken into account
here.

Trac #9336

Signed-off-by: Austin Seipp <austin@well-typed.com>
Revert "base: Fix (**) instance for Data.Complex (#8539)"

This broke validate due to name shadowing warnings.

This reverts commit 1f6b1ab4b6d7203481bfaf374b014972f7756fb2.
Comments only
When outputting list of available instances, sort it.

Summary:
The intent of this commit is to make test suite cases more stable, so that
it doesn't matter what order we load interface files in, the test output
doesn't change.

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

Test Plan: validate

Reviewers: simonpj, austin

Subscribers: thomie, carter

Differential Revision: https://phabricator.haskell.org/D484
Support for "with" renaming syntax, and output a feature flag.

Summary:
- Feature flag indicates to Cabal that we support thinning and renaming as
  it needs.

- Support -package "base with (Foo as Bar)" which brings the ordinary
  modules into scope, as well as adding the renamings to scope.

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

Test Plan: validate

Reviewers: simonpj, austin

Subscribers: thomie, carter

Differential Revision: https://phabricator.haskell.org/D485
Reimplement im/export primitives for integer-gmp2

The import/export operations were available in `integer-gmp-0.5.1`
already, but need to be reimplemented from scratch for the
`integer-gmp-1.0.0` rewrite.

This also adds a few more operations than were previously available for
use w/ the `BigNat` type (which will be useful for implementing
serialisation for the upcoming `Natural` type)

Specifically, the following operations are (re)added (albeit with
slightly different type-signatures):

 - `sizeInBaseBigNat`
 - `sizeInBaseInteger`
 - `sizeInBaseWord#`

 - `exportBigNatToAddr`
 - `exportIntegerToAddr`
 - `exportWordToAddr`
 - `exportBigNatToMutableByteArray`
 - `exportIntegerToMutableByteArray`
 - `exportWordToMutableByteArray`

 - `importBigNatFromAddr`
 - `importIntegerFromAddr`
 - `importBigNatFromByteArray`
 - `importIntegerFromByteArray`

NOTE: The `integerGmpInternals` test-case is updated but not yet
      re-enabled as it contains tests for other primitives which aren't
      yet reimplemented.

This addresses #9281

Reviewed By: austin, duncan

Differential Revision: https://phabricator.haskell.org/D480
Restore exact old semantics of `decodeFloat`

`integer-gmp2` uses the new 64bit-based IEEE deconstructing primop
introduced in b62bd5ecf3be421778e4835010b6b334e95c5a56.

However, the returned values differ for exceptional IEEE values:

Previous (expected) semantics:

  > decodeFloat (-1/0)
  (-4503599627370496,972)

  > decodeFloat (1/0)
  (4503599627370496,972)

  > decodeFloat (0/0)
  (-6755399441055744,972)

Currently (broken) semantics:

  > decodeFloat (-1/0 :: Double)
  (-9223372036854775808,-53)

  > decodeFloat (1/0 :: Double)
  (-9223372036854775808,-53)

  > decodeFloat (0/0 :: Double)
  (-9223372036854775808,-53)

This patch reverts to the old expected semantics.

I plan to revisit the implementation during GHC 7.11 development.

This should address #9810

Reviewed By: austin, ekmett, luite

Differential Revision: https://phabricator.haskell.org/D486
Optimise `Identity` instances with `coerce`

This also overrides all optional `Foldable` methods
(which would otherwise be default-implemented in terms of `foldMap`)
with supposedly optimally minimal implementations.

While at it, this also removes the redundant `{-# LANGUAGE CPP #-}`.

Reviewed By: austin, dfeuer

Differential Revision: https://phabricator.haskell.org/D467
rts: remove old-style field designator extension (#9396)

Authored-by: jrp

Signed-off-by: Austin Seipp <austin@well-typed.com>
The test runner now also works under the msys-native Python.

Msys binaries apply heuristics to escape paths in arguments intended for
non-msys binaries, which breaks timeout invocations, see #9626.

Signed-off-by: Austin Seipp <austin@well-typed.com>
Refactor: use System.FilePath.splitSearchPath

Summary:
To address #2521 ("Trailing colon on GHC_PACKAGE_PATH doesn't work with
ghc-pkg"), we were using a custom version of splitSearchPath (e4f46f5de). This
solution however caused issue #9698 ("GHC_PACKAGE_PATH should be more lenient
for empty paths").

This patch reverts back to System.FilePath.splitSearchPath (fixes #9698) and
adresses (#2521) by testing for a trailing search path separators explicitly
(instead of implicitly using empty search path elements).

Empty paths are now allowed (ignored on Windows, interpreted as current
directory on Posix systems), and trailing path separator still tack on the
user and system package databases.

Also update submodule filepath, which has a version of splitSearchPath which
handles quotes in the same way as our custom version did.

Test Plan:
$ GHC_PACKAGE_PATH=/::/home: ./ghc-pkg list
...
db stack: ["/",".","/home","<userdb>","<systemdb>"]
...

Reviewers: austin

Reviewed By: austin

Subscribers: thomie, carter, simonmar

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

GHC Trac Issues: #2521, #9698