packages/base.git
5 years agoTypo master
Jose Pedro Magalhaes [Tue, 1 Apr 2014 09:05:11 +0000 (10:05 +0100)] 
Typo

5 years agoadd /Since/ annotation
Herbert Valerio Riedel [Thu, 27 Mar 2014 15:47:16 +0000 (16:47 +0100)] 
add /Since/ annotation

5 years agoMark Data.Coerce as Unsafe (#8827)
Austin Seipp [Mon, 24 Mar 2014 05:40:33 +0000 (00:40 -0500)] 
Mark Data.Coerce as Unsafe (#8827)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoComments only.
Iavor S. Diatchki [Mon, 24 Mar 2014 00:10:38 +0000 (17:10 -0700)] 
Comments only.

Fix the documentation on CmpSymbol and CmpNat; add a note on (<=?).

5 years agoAdd functions for comparing type-level Nats and Symbols.
Iavor S. Diatchki [Wed, 19 Mar 2014 02:35:05 +0000 (19:35 -0700)] 
Add functions for comparing type-level Nats and Symbols.

5 years agoImport Coercible from GHC.Types
Joachim Breitner [Sun, 16 Mar 2014 17:35:00 +0000 (18:35 +0100)] 
Import Coercible from GHC.Types

5 years agoRemove misleading comment
Austin Seipp [Thu, 13 Mar 2014 23:19:28 +0000 (18:19 -0500)] 
Remove misleading comment

We actually can't inline at phase 0 here, because there's probably a
pretty good chance 'map' will get optimized away which will defeat the
rule.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoAdd RULE for "map coerce = map" (#8767)
Austin Seipp [Thu, 13 Mar 2014 21:51:34 +0000 (16:51 -0500)] 
Add RULE for "map coerce = map" (#8767)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUse not# rather than (`xor#` (-1)) for complement
Simon Peyton Jones [Thu, 13 Mar 2014 12:12:53 +0000 (12:12 +0000)] 
Use not# rather than (`xor#` (-1)) for complement

I'm not sure why we weren't using not# before; maybe it wasn't
a primpop at that stage?  Strange.

5 years agoComments only, about the "RA" and "RL" nomenclature for shifts
Simon Peyton Jones [Thu, 13 Mar 2014 12:11:36 +0000 (12:11 +0000)] 
Comments only, about the "RA" and "RL" nomenclature for shifts

5 years agoAdd shiftR and shiftL implementations to instance Bits Integer
Simon Peyton Jones [Thu, 13 Mar 2014 12:11:01 +0000 (12:11 +0000)] 
Add shiftR and shiftL implementations to instance Bits Integer

Apart from simply making sense (avoid the conditional in 'shift'),
this makes left and right shifts on Integer more likely to inline
(plain 'shift' is just too large); and this in turn is important
when fixing the Integer case of #8832

5 years agoWorkaround failed constant-folding for zeroBits
Herbert Valerio Riedel [Sat, 1 Mar 2014 13:45:48 +0000 (14:45 +0100)] 
Workaround failed constant-folding for zeroBits

For some reason GHC fails to constant fold `zeroBits :: Int` and
`zeroBits :: Integer`; `ghc -show-iface` shows

  $fBitsInt_$czeroBits :: GHC.Types.Int
     {- Strictness: m,
        Unfolding: (GHC.Types.I# (GHC.Prim.andI# 1 (GHC.Prim.notI# 1))) -}

Otoh, constant-folding works as expected, reducing `zeroBits` to 0 constant
for the other integer-types (= {Word,Int}{8,16,32,64}` and `Word`). So this
quickfix is actually just treating the symptom rather than the cause.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoTweak Haddock comments in `Data.Ord.Down` added in ebc85262c
Herbert Valerio Riedel [Sat, 1 Mar 2014 10:40:21 +0000 (11:40 +0100)] 
Tweak Haddock comments in `Data.Ord.Down` added in ebc85262c

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoTweak documentation and update changelog.md
Herbert Valerio Riedel [Sat, 1 Mar 2014 10:29:48 +0000 (11:29 +0100)] 
Tweak documentation and update changelog.md

This adds release note entries to changelog and tweaks Haddock comments
with respect to the recent commits 1a9abe7a1a3c7 (re #8797) and
f932b79948f0 (re #8745)

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAdd some instances for Monoid/Applicative (#8797)
Austin Seipp [Fri, 28 Feb 2014 20:53:40 +0000 (14:53 -0600)] 
Add some instances for Monoid/Applicative (#8797)

As noted in the ticket, there's no particular reason why there aren't
Generic, Typeable, and Data instances for the types in the
Monoid/Applicative modules.

Furthermore, Product and Sum should also have Num instances as well as
Edward noted.

Aside from that, this patch also changes the dependency chain slightly -
it moves the Monoid Proxy instance into Data.Monoid and out of
Data.Proxy.

Why? Cycles (of course). Monoid depends on Typeable. Typeable uses
Proxy. Proxy uses Monoid. Boom. Luckily, Proxy only depends on Monoid
outside of the GHC namespace, so the fix is easy and clean.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoCreate Data.Coerce (#8745)
Austin Seipp [Fri, 28 Feb 2014 17:50:30 +0000 (11:50 -0600)] 
Create Data.Coerce (#8745)

Data.Coerce is a Trustworthy module which safely exports both
`Coercible` and `coerce` for use by users, as it can now be considered
safe under role checking.

See the ticket for details.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoAdd new Data.Bits.Bits(zeroBits) method
Herbert Valerio Riedel [Fri, 28 Feb 2014 08:39:41 +0000 (09:39 +0100)] 
Add new Data.Bits.Bits(zeroBits) method

This adds a new method to `Bits` which completes the Bits API
with a direct way to introduce a value with all bits cleared.

See also original proposal at

  http://permalink.gmane.org/gmane.comp.lang.haskell.libraries/21157

5 years agoTweak Haddock markup in Data.Typeable
Herbert Valerio Riedel [Tue, 25 Feb 2014 16:25:44 +0000 (17:25 +0100)] 
Tweak Haddock markup in Data.Typeable

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoLanguage extension wibble (see #8813)
Jose Pedro Magalhaes [Tue, 25 Feb 2014 11:35:30 +0000 (11:35 +0000)] 
Language extension wibble (see #8813)

5 years agoProvide Typeable1..7 as type synonyms (see #8813)
Jose Pedro Magalhaes [Tue, 25 Feb 2014 10:28:20 +0000 (10:28 +0000)] 
Provide Typeable1..7 as type synonyms (see #8813)

5 years agoAdd `withMVarMasked` (re #8818)
Herbert Valerio Riedel [Tue, 25 Feb 2014 10:04:46 +0000 (11:04 +0100)] 
Add `withMVarMasked` (re #8818)

Like `withMVar`, but the @IO@ action in the second argument is executed
with asynchronous exceptions masked. This completes the `MVar` API,
which already contained `modifyMVarMasked` and `modifyMVarMasked_`.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoMinor fixes to Haddock markup
Herbert Valerio Riedel [Sun, 16 Feb 2014 21:03:17 +0000 (22:03 +0100)] 
Minor fixes to Haddock markup

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoTweak Haddock markup in Control.Applicative
Herbert Valerio Riedel [Sun, 16 Feb 2014 20:59:31 +0000 (21:59 +0100)] 
Tweak Haddock markup in Control.Applicative

This (arguably) improves rendering with Haddock 2.14

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoFix typo in documentation of Data.Functor.($>)
Herbert Valerio Riedel [Sun, 16 Feb 2014 20:57:39 +0000 (21:57 +0100)] 
Fix typo in documentation of Data.Functor.($>)

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoMinor typo in comment
Gabor Greif [Wed, 19 Feb 2014 22:22:04 +0000 (23:22 +0100)] 
Minor typo in comment

5 years agoUse new bitwise Int# primops in Data.Bits (re #8791)
Chris Dueck [Wed, 19 Feb 2014 21:18:14 +0000 (22:18 +0100)] 
Use new bitwise Int# primops in Data.Bits (re #8791)

The new primops (see also #7689) allow to optimize
`instance Bits Int` by allowing to operate directly on Int#
instead of having to convert to Word# and back to Int# again.

Authored-by: Chris Dueck <crdueck@uwaterloo.ca>
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoExpand comment for enumDeltaToInteger1
Joachim Breitner [Mon, 17 Feb 2014 09:30:07 +0000 (09:30 +0000)] 
Expand comment for enumDeltaToInteger1

5 years agoWrong bug number
Joachim Breitner [Fri, 14 Feb 2014 10:19:35 +0000 (10:19 +0000)] 
Wrong bug number

the previous commit added a testcase for #8766, not #8374 -- too many
tabs open.

5 years agoTest case for #8374
Joachim Breitner [Fri, 14 Feb 2014 10:17:52 +0000 (10:17 +0000)] 
Test case for #8374

5 years agoImprove list fusion for [n::Integer..m]
Joachim Breitner [Fri, 14 Feb 2014 09:17:22 +0000 (09:17 +0000)] 
Improve list fusion for [n::Integer..m]

enumFromTo for Integers goes via enumDeltaToInteger, which is less
efficient, as the "delta > = 0" check prevents more inlining which is
required for good fusion code. This rule avoids tihs check for the
common case of "delta = 1", makes up_fb visible and hence inlineable,
which greatly improves "length [n:Integer..m]"; even more so with
CallArity enabled. (#8766)

5 years agoInline maximum/minium a bit more aggresively
Joachim Breitner [Wed, 29 Jan 2014 16:29:53 +0000 (17:29 +0100)] 
Inline maximum/minium a bit more aggresively

in order to allow fusion of the foldr in the foldl in the foldl' therein.

5 years agoImplement foldl with foldr
Joachim Breitner [Tue, 28 Jan 2014 13:31:05 +0000 (14:31 +0100)] 
Implement foldl with foldr

together with the call arity analysis and the following patch (about inlining
maximum), we get nice benefits from fusing foldl and foldl' with good
producers:

                Min          -0.1%    -74.5%     -6.8%     -8.3%    -50.0%
                Max          +0.2%      0.0%    +38.5%    +38.5%      0.0%
     Geometric Mean          -0.0%     -4.1%     +7.7%     +7.7%     -0.8%

Because this depends on a compiler optimisation, we have to watch out for cases
where this is not an improvements, and whether they occur in the wild.

5 years agoAdd release note about new `SomeAsyncException`
Herbert Valerio Riedel [Wed, 5 Feb 2014 22:16:10 +0000 (23:16 +0100)] 
Add release note about new `SomeAsyncException`

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoFix a popular typo
Gabor Greif [Sat, 1 Feb 2014 20:24:36 +0000 (21:24 +0100)] 
Fix a popular typo

5 years agoShow docs for coerce and Coercible in GHC.Exts
Joachim Breitner [Thu, 30 Jan 2014 16:28:51 +0000 (16:28 +0000)] 
Show docs for coerce and Coercible in GHC.Exts

as that is the canonical place for people to import them from.

5 years agoDerive `FiniteBits` for integral newtype wrappers
Herbert Valerio Riedel [Thu, 30 Jan 2014 09:34:25 +0000 (10:34 +0100)] 
Derive `FiniteBits` for integral newtype wrappers

When `FiniteBits` was introduced in cddc9024e67a6d4c01bb190839d0134af8c907e0
only the standard Haskell 2010 finite-size integral types were given a
`FiniteBits` instance, however, since also a DEPRECATION warning was put
in place (as per 701d9ed4b2bec5922709a91bfb625881d7dd47f0) for `bitSize`
which might point people to to `FiniteBits`, it seems sensible to derive
`FiniteBits` for all integral newtype wrappers as well.

N.B.: This makes `Integer` the only type in `base` with a `Bits`
      instance but no `FiniteBits` instance.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoImprove Haddock markup
Herbert Valerio Riedel [Thu, 30 Jan 2014 09:30:04 +0000 (10:30 +0100)] 
Improve Haddock markup

This fixes the markup at the top of `Control.Arrow`, and improves the
markup inside DEPRECATED strings.

(Haddock supports markup inside DEPRECATED messages, which allows to
turn references to Haskell entities into hyperlinks by using the usual
Haddock markup.)

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoImprove Haddock markup in `Control.Concurrent.MVar`
Herbert Valerio Riedel [Wed, 29 Jan 2014 21:05:47 +0000 (22:05 +0100)] 
Improve Haddock markup in `Control.Concurrent.MVar`

This adds a labeled hyperlink to the Concurrent Haskell paper, and
replaces the itemized-list headings with proper section
headings (available since Haddock-2.14).

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAdd changelog entry for new `FiniteBits` class
Herbert Valerio Riedel [Wed, 29 Jan 2014 15:43:20 +0000 (16:43 +0100)] 
Add changelog entry for new `FiniteBits` class

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoUpdate `changelog.md` to contain more changes
Herbert Valerio Riedel [Wed, 29 Jan 2014 15:25:15 +0000 (16:25 +0100)] 
Update `changelog.md` to contain more changes

Some important changes might still be missing from the changelog.

Also, `base.cabal` is updated to include `changelog.md` in the
`cabal sdist` tarball.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAdd `/Since: 4.7.0.0/` to `MkFixed` constructor
Herbert Valerio Riedel [Wed, 29 Jan 2014 15:23:44 +0000 (16:23 +0100)] 
Add `/Since: 4.7.0.0/` to `MkFixed` constructor

As it's been exposed only since
05c03d850a7da7bd708e9a9da7de2b9ba36b6041

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAdd Hackage-supported `changelog.md` file
Herbert Valerio Riedel [Wed, 29 Jan 2014 12:53:27 +0000 (13:53 +0100)] 
Add Hackage-supported `changelog.md` file

The contents has been ripped from the release notes. I've used markdown
as this may allow for automatic conversion to docbook XML in the future,
should we choose to maintain the `base` changelog in a more human-friendly
markup format and closer to the `base`-source tree.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAdd newline before two `/Since: 4.7.0.0/` occurences
Herbert Valerio Riedel [Wed, 29 Jan 2014 12:03:29 +0000 (13:03 +0100)] 
Add newline before two `/Since: 4.7.0.0/` occurences

See also `/Since: .../` convention described in
6368362f4486226dee9d54665b4fdffde24e56f1

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agogo-ify foldr2
Joachim Breitner [Tue, 28 Jan 2014 18:09:13 +0000 (18:09 +0000)] 
go-ify foldr2

This helps with the changes in #7994, but might also generally be a good
idea (ignore the runtime):

--------------------------------------------------------------------------------
        Program           Size    Allocs   Runtime   Elapsed  TotalMem
           fft2          -0.1%     -1.5%      0.07      0.07     +0.0%
       fibheaps          +0.0%    -17.2%      0.03      0.03     +0.0%
          fluid          +0.5%     -0.7%      0.01      0.01     +0.0%
      integrate          +0.0%     -0.9%      0.16      0.16     +0.0%
        rewrite          +0.0%     -1.1%      0.02      0.02     +0.0%
--------------------------------------------------------------------------------
            Min          -0.1%    -17.2%     -1.6%     +0.0%     +0.0%
            Max          +0.5%     +0.0%   +107.7%   +106.2%    +11.3%
 Geometric Mean          +0.0%     -0.2%    +23.7%    +23.9%     +0.1%

5 years agoDocument another unsafeDupablePerformIO limitation.
Bertram Felgenhauer [Mon, 4 Nov 2013 14:57:51 +0000 (15:57 +0100)] 
Document another unsafeDupablePerformIO limitation.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoadd 'Since' annotations and remove an unneeded import
Gabor Greif [Sat, 4 Jan 2014 00:43:27 +0000 (01:43 +0100)] 
add 'Since' annotations and remove an unneeded import

5 years agoAdd functions to compare Nat and Symbol types for equality.
Iavor S. Diatchki [Fri, 3 Jan 2014 23:11:34 +0000 (15:11 -0800)] 
Add functions to compare Nat and Symbol types for equality.

5 years agoImprove error messages for partial functions in Data.Data
Krzysztof Langner [Wed, 1 Jan 2014 13:14:46 +0000 (14:14 +0100)] 
Improve error messages for partial functions in Data.Data

This closes: #5412

5 years agos/therad/thread/
Edward Z. Yang [Tue, 31 Dec 2013 15:13:58 +0000 (23:13 +0800)] 
s/therad/thread/

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoProperly detect msys2/x64 shell as Windows.
Austin Seipp [Mon, 9 Dec 2013 12:32:45 +0000 (06:32 -0600)] 
Properly detect msys2/x64 shell as Windows.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoAdd fusion RULES for mapMaybe
Takano Akio [Wed, 20 Nov 2013 07:30:31 +0000 (16:30 +0900)] 
Add fusion RULES for mapMaybe

5 years agoAvoid unsafeCoerce# in TopHandler
Joachim Breitner [Wed, 4 Dec 2013 10:30:45 +0000 (10:30 +0000)] 
Avoid unsafeCoerce# in TopHandler

instead use `... >> fail "..."` to turn IO () into IO a.

5 years agoAdd `instance {Bits,FiniteBits} Bool`
Herbert Valerio Riedel [Sun, 24 Nov 2013 12:14:16 +0000 (13:14 +0100)] 
Add `instance {Bits,FiniteBits} Bool`

This interprets `Bool` as an 1-bit "unsigned" bit-field and provides a
simple (not particularily optimized) implementation to that end.

See "Proposal: Add `instance Bits Bool`" by @ekmett, Nov 2013,

 http://permalink.gmane.org/gmane.comp.lang.haskell.libraries/20663

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoFix up test topHandler03 by ignoring unhelpful shell output
Duncan Coutts [Fri, 15 Nov 2013 11:26:03 +0000 (11:26 +0000)] 
Fix up test topHandler03 by ignoring unhelpful shell output

Shells! Grrrr. Some shells print out a message if your program terminates with
a signal. In the case of topHandler03 which deliberately exits with signal 15
SIGTERM, some shells were printing "Terminated" to stdout.

Why the testsuite driver goes via a shell I do not know (it also messes up the
exit codes for signals).

5 years agoAdd tests for the top level exception handler
Duncan Coutts [Thu, 14 Nov 2013 15:16:30 +0000 (15:16 +0000)] 
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

5 years agoHandle ExitFailure (-sig) by killing process with signal
Duncan Coutts [Thu, 14 Nov 2013 15:15:31 +0000 (15:15 +0000)] 
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.

5 years agoSpelling in comments
Gabor Greif [Fri, 8 Nov 2013 07:20:14 +0000 (08:20 +0100)] 
Spelling in comments

5 years ago*Really* RTS crash due to bad coercion.
Merijn Verstraaten [Wed, 24 Jul 2013 18:00:42 +0000 (19:00 +0100)] 
*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>
5 years agoFix OSX RTS crash due to bad coercion.
Merijn Verstraaten [Wed, 24 Jul 2013 13:37:25 +0000 (14:37 +0100)] 
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>
5 years agoAdd Ord instances for GHC.Generics (#7263)
Krzysztof Gogolewski [Fri, 1 Nov 2013 14:29:15 +0000 (15:29 +0100)] 
Add Ord instances for GHC.Generics (#7263)

5 years agoExport abstract `Text.Read.Lex.Number` type
Herbert Valerio Riedel [Fri, 1 Nov 2013 09:14:04 +0000 (10:14 +0100)] 
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>
5 years agoAdd a couple of `/Since: 4.7.0.0/` annotations
Herbert Valerio Riedel [Fri, 1 Nov 2013 09:07:44 +0000 (10:07 +0100)] 
Add a couple of `/Since: 4.7.0.0/` annotations

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAdd new module Data.Type.Bool, defining &&, || and Not.
Richard Eisenberg [Wed, 30 Oct 2013 20:32:06 +0000 (16:32 -0400)] 
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.

5 years agoApply Gabor Lehel's suggestions.
Richard Eisenberg [Tue, 22 Oct 2013 15:32:33 +0000 (11:32 -0400)] 
Apply Gabor Lehel's suggestions.

5 years agoName change `CoercionT` to `CoercionType`, and addition of `repr`.
Richard Eisenberg [Mon, 21 Oct 2013 03:44:29 +0000 (23:44 -0400)] 
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

5 years agoName changes and addition of gcastWith and (==) to Data.Type.Equality.
Richard Eisenberg [Mon, 21 Oct 2013 03:43:16 +0000 (23:43 -0400)] 
Name changes and addition of gcastWith and (==) to Data.Type.Equality.

For more info, see
http://ghc.haskell.org/trac/ghc/wiki/TypeLevelNamingIssues

5 years agoChanged export list to create better haddock. Added eqT to exports.
Richard Eisenberg [Sun, 20 Oct 2013 21:02:19 +0000 (17:02 -0400)] 
Changed export list to create better haddock. Added eqT to exports.

5 years agoUpdate `bug-reports` URL and version constraints
Herbert Valerio Riedel [Sun, 27 Oct 2013 12:17:27 +0000 (13:17 +0100)] 
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>
5 years agoUpdate aux files `config.{guess,sub}` and `install-sh`
Herbert Valerio Riedel [Sun, 27 Oct 2013 12:16:19 +0000 (13:16 +0100)] 
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>
5 years agoRun length001 test with +RTS -K8m
Austin Seipp [Fri, 25 Oct 2013 10:05:44 +0000 (05:05 -0500)] 
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>
5 years agoGHC.Conc.Sync: Pass TSO to stackOverflow
Ben Gamari [Sat, 7 Sep 2013 22:16:52 +0000 (18:16 -0400)] 
GHC.Conc.Sync: Pass TSO to stackOverflow

5 years agoDon't include `{Event,HsUnix}Config.h` in source distribution
Herbert Valerio Riedel [Thu, 24 Oct 2013 20:19:23 +0000 (22:19 +0200)] 
Don't include `{Event,HsUnix}Config.h` in source distribution

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoRemove now-unnecessary NOINLINE pragmas
Simon Peyton Jones [Fri, 18 Oct 2013 11:32:51 +0000 (12:32 +0100)] 
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

5 years agoSpelling in commments
Simon Peyton Jones [Fri, 4 Oct 2013 17:55:50 +0000 (18:55 +0100)] 
Spelling in commments

5 years agoAdd Show and Read instances for Data.Ord.Down
Krzysztof Gogolewski [Mon, 14 Oct 2013 19:47:40 +0000 (21:47 +0200)] 
Add Show and Read instances for Data.Ord.Down

libraries mailing list thread "Proposal: Show and Read for Data.Ord.Down", Sep 2013, http://www.haskell.org/pipermail/libraries/2013-September/020867.html

5 years agoFix hangs with -threaded on iOS (#8307)
Austin Seipp [Sat, 12 Oct 2013 03:11:53 +0000 (22:11 -0500)] 
Fix hangs with -threaded on iOS (#8307)

Authored-by: Luke Iannini <lukexi@me.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoClarify docs for throwTo wrt atomicity (#8432)
Austin Seipp [Sat, 12 Oct 2013 03:07:40 +0000 (22:07 -0500)] 
Clarify docs for throwTo wrt atomicity (#8432)

Authored-by: Bertram Felgenhauer <bertram.felgenhauer@gmail.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoClean-up implementation of GHC.TypeLits.
Iavor S. Diatchki [Thu, 10 Oct 2013 02:25:37 +0000 (19:25 -0700)] 
Clean-up implementation of GHC.TypeLits.

For a more detailed explanation please see the following commint in GHC:
8af2dbea315f5d0c9f6b1db39d78cee7b6cc43f1

5 years agoRename (:=:) to (:~:) and add Data.Type.Coercion
Edward Kmett [Wed, 9 Oct 2013 01:22:14 +0000 (21:22 -0400)] 
Rename (:=:) to (:~:) and add Data.Type.Coercion

Bikeshed color chosen by core libraries committee

Knock-on effects:

* Made the instances for Read, Enum, Data and Bounded for (:~:) more robust
* Renamed Data.Type.Equality.coerce to subst. It collided with GHC.Prim.coerce from Coercible.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoTypo in documentation
Jose Pedro Magalhaes [Mon, 7 Oct 2013 20:36:15 +0000 (21:36 +0100)] 
Typo in documentation

5 years agoPort ThreadDelay001 to the "time" library
Reid Barton [Wed, 2 Oct 2013 01:10:49 +0000 (21:10 -0400)] 
Port ThreadDelay001 to the "time" library

... as "old-time" isn't built when cross-compiling.

Issue #8395.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoAdd `instance Monoid a => Monoid (Const a b)`
Herbert Valerio Riedel [Sat, 5 Oct 2013 13:40:28 +0000 (15:40 +0200)] 
Add `instance Monoid a => Monoid (Const a b)`

For more details, see original proposal at

 http://permalink.gmane.org/gmane.comp.lang.haskell.libraries/20369

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAdd fixity declaration for type-level functions.
Iavor S. Diatchki [Thu, 3 Oct 2013 22:25:28 +0000 (15:25 -0700)] 
Add fixity declaration for type-level functions.

5 years agoRename someSymVal to someSymbolVal
Iavor S. Diatchki [Thu, 3 Oct 2013 22:25:18 +0000 (15:25 -0700)] 
Rename someSymVal to someSymbolVal

5 years agoRemove all but the basic operations on type-level literals.
Iavor S. Diatchki [Thu, 3 Oct 2013 21:39:58 +0000 (14:39 -0700)] 
Remove all but the basic operations on type-level literals.

The plan is to have the more sophisticated operations in a separate
library.

5 years agoFix Windows build.
Austin Seipp [Wed, 2 Oct 2013 01:15:31 +0000 (20:15 -0500)] 
Fix Windows build.

In dfb52c3d the default language was set to Haskell2010 - by default,
GHC is less strict about the layout rule (controlled by
-XNonincreasingIndentation), but not when we explicitly set the language
to H2010. It turns out we relied on this behavior in the Windows build.

Thanks to Reid Barton for pointing this out.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoSystem.IO.Unsafe: cleanup: make unsafeFixIO pseudocode more valid
Sergei Trofimovich [Mon, 30 Sep 2013 13:12:29 +0000 (15:12 +0200)] 
System.IO.Unsafe: cleanup: make unsafeFixIO pseudocode more valid

Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
5 years agoFix name of minor GC function.
Austin Seipp [Mon, 30 Sep 2013 12:47:12 +0000 (07:47 -0500)] 
Fix name of minor GC function.

I accidentally forgot to commit this.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoExpose performMinorGC (#8257)
Austin Seipp [Sun, 29 Sep 2013 14:42:06 +0000 (09:42 -0500)] 
Expose performMinorGC (#8257)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoAdd missing/remove redundant `{-# LANGUAGE CPP #-}`s
Herbert Valerio Riedel [Sat, 28 Sep 2013 15:35:30 +0000 (17:35 +0200)] 
Add missing/remove redundant `{-# LANGUAGE CPP #-}`s

The `CPP` forgotten were in windows-specific modules, and the redundant
`CPP` files were removed in some `.hsc` files.

Note: `.hsc` files only require `{-# LANGUAGE CPP #-}` annotations if
they use `##`, as `hsc2hs` removes all non-escaped `#`-directives.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAdd `/Since: 4.7.0.0/` to new entities in fc904366
Herbert Valerio Riedel [Sat, 28 Sep 2013 11:01:28 +0000 (13:01 +0200)] 
Add `/Since: 4.7.0.0/` to new entities in fc904366

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoRemove obsolete `include/Nhc98BaseConfig.h`
Herbert Valerio Riedel [Sat, 28 Sep 2013 10:48:49 +0000 (12:48 +0200)] 
Remove obsolete `include/Nhc98BaseConfig.h`

This is a left-over from f231a01d2217d31

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoDrop redundant `{-# LANGUAGE #-}` pragmas
Herbert Valerio Riedel [Sat, 28 Sep 2013 10:42:31 +0000 (12:42 +0200)] 
Drop redundant `{-# LANGUAGE #-}` pragmas

This removes language pragmas from Haskell modules which are implicitly
active with `default-language: Haskell2010`. Specifically, the following
language extension pragmas are removed by this commit:

 - PatternGuards
 - ForeignFunctionInterface
 - EmptyDataDecls
 - NoBangPatterns

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoModernize and refactor `base.cabal`
Herbert Valerio Riedel [Sat, 28 Sep 2013 09:10:23 +0000 (11:10 +0200)] 
Modernize and refactor `base.cabal`

 - removes the redundant `impl(ghc)` conditional
 - unifies the `exposed-modules` list
 - sorts lists alphabetically
 - convert to uniform `,`-less & line-oriented lists
   (helps reduce diff-noise in future)
 - remove obsolete `nhc98-options` field
 - avoid `{}`-style Cabal grammar
 - remove `extensions: CPP`
 - add `category` field to silence Cabal warning
 - add missing entries to `extra-source-files`
   (the source distribution wasn't buildable because of this!)
 - list all occuring `LANGUAGE` pragmas in `other-extensions`
 - explicitly declare `default-language: Haskell2010`

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAdd a few missing `{-# LANGUAGE CPP #-}`s
Herbert Valerio Riedel [Sat, 28 Sep 2013 09:08:57 +0000 (11:08 +0200)] 
Add a few missing `{-# LANGUAGE CPP #-}`s

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoFix comment typo introduced in 6368362f44
Herbert Valerio Riedel [Fri, 27 Sep 2013 06:29:24 +0000 (08:29 +0200)] 
Fix comment typo introduced in 6368362f44

5 years agoDefine typeRep in terms of new Proxy#
Austin Seipp [Thu, 26 Sep 2013 06:43:54 +0000 (01:43 -0500)] 
Define typeRep in terms of new Proxy#

Data.Typeable.Internal.Typeable now contains typeRep# - defined over
Proxy# - instead of typeRep, the latter now being a wrapper of the
former.

Authored-by: Edward Kmett <ekmett@gmail.com>
Authored-by: Austin Seipp <austin@well-typed.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoDocumentation for GHC.Generics
Jose Pedro Magalhaes [Thu, 26 Sep 2013 21:30:49 +0000 (23:30 +0200)] 
Documentation for GHC.Generics

5 years agoRevert "Add fmapCoerce to Functor class."
Austin Seipp [Thu, 26 Sep 2013 04:37:45 +0000 (23:37 -0500)] 
Revert "Add fmapCoerce to Functor class."

This reverts commit 3da4fd92e005cb9348ab2852d9268ad61ae1b347.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoAdd fmapCoerce to Functor class.
Austin Seipp [Wed, 25 Sep 2013 04:20:35 +0000 (23:20 -0500)] 
Add fmapCoerce to Functor class.

This allows coercions to work under functors that are not locally known.

Authored-by: Edward Kmett <ekmett@gmail.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>