Spelling in commments
Remove now-unnecessary NOINLINE pragmas

The NOINLINEs were a work-around for a bug that was fixed
by patch f7e7948 to ghc, which also fixed Trac #8449
Don't include `{Event,HsUnix}Config.h` in source distribution

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
GHC.Conc.Sync: Pass TSO to stackOverflow
Run length001 test with +RTS -K8m

Otherwise it uses excessive amounts of stack space (~1GB at peak) when
compiled without -O.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Update aux files `config.{guess,sub}` and `install-sh`

This updates the files to the versions bundled with GNU automake 1.13.3

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Update `bug-reports` URL and version constraints

This also sets the Hackage `Category` to `Prelude` as `base`
obviously provides a `Prelude` module.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Changed export list to create better haddock. Added eqT to exports.
Name changes and addition of gcastWith and (==) to Data.Type.Equality.

For more info, see
http://ghc.haskell.org/trac/ghc/wiki/TypeLevelNamingIssues
Name change `CoercionT` to `CoercionType`, and addition of `repr`.

`repr` converts a `(:~:)` to a `Coercion`. Name changes are as discussed
on http://ghc.haskell.org/trac/ghc/wiki/TypeLevelNamingIssues
Apply Gabor Lehel's suggestions.
Add new module Data.Type.Bool, defining &&, || and Not.

This change was necessary given the instances for (==) in
Data.Type.Equality. These need conjunction, and a local
definition of conjunction doesn't work if a client is reasoning
about equality. Both the client and the library need the
same conjunction, so that is what Data.Type.Bool provides.
Add a couple of `/Since: 4.7.0.0/` annotations

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Export abstract `Text.Read.Lex.Number` type

This fixes some "could not find link destinations" Haddock warnings and seems to
the "right thing to do". The since-annotation for `Number` is changed as the `Number`
has becomes referencable in user code only w/ 4.7.0.0 even though it existed already
in 4.6.0.0.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Add Ord instances for GHC.Generics (#7263)
Fix OSX RTS crash due to bad coercion.

The code coerces Int to CInt, which causes an overflow if Int is bigger
than CInt (for example, Int 64bit, CInt 32 bit). This results in a
negative value being passed to c_poll.

On Linux all negative values are treated as infinite timeouts, which
gives subtly wrong semantics, but is unlikely to produce actual bugs.

OSX insists that only -1 is a valid value for infinite timeout, any
other negative timeout is treated as an invalid argument.

This patch replaces the c_poll call with a loop that handles the
overflow gracefully by chaining multiple calls to poll to obtain the
proper semantics.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
*Really* RTS crash due to bad coercion.

Previous commit only moved the coercion mistake to a different
architecture (i.e. underflow could still occur on platforms where Int
is smaller than CInt). This patch should definitively deal with all
possible combinations.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Spelling in comments
Handle ExitFailure (-sig) by killing process with signal

On Unix we now use negative exit codes in ExitFailure to indicate that a
process exited due to a signal. This patch implements the case for when
a ExitFailure exception propagates out of the top of main (and is
handled by the topHandler).

For a negative ExitFailure code, we try to kill the process using that
signal (the details of that are handled by shutdownHaskellAndSignal from
the RTS). For an exit code outside the valid ranges, we use 0xff.
Add tests for the top level exception handler

The top level exception handler is wrapped around main, and FFI exports.
It handles exceptions that are not otherwise caught in user code. For
most exception is just prints them, but handles a few specially,
including ExitCode and UserInterrupt.

On Unix it installs a signal handler for SIGINT to translate it into a
UserInterrupt async exception.

So we test that:

1. receiving SIGINT does trigger a UserInterrupt async exception
2. an unhandled UserInterrupt makes us kill ourselves with SIGINT
3. an unhandled ExitFailure (-sig) makes us kill ourselves with sig