packages/base.git
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

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

6 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

6 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>
6 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>
6 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

6 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>
6 years agoTypo in documentation
Jose Pedro Magalhaes [Mon, 7 Oct 2013 20:36:15 +0000 (21:36 +0100)] 
Typo in documentation

6 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>
6 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>
6 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.

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

6 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.

6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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

6 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>
6 years agoDocumentation for GHC.Generics
Jose Pedro Magalhaes [Thu, 26 Sep 2013 21:30:49 +0000 (23:30 +0200)] 
Documentation for GHC.Generics

6 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>
6 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>
6 years agoAdd Foldable/Traversable instances for 'Const m'
Austin Seipp [Wed, 25 Sep 2013 03:11:27 +0000 (22:11 -0500)] 
Add Foldable/Traversable instances for 'Const m'

These were proposed a while ago but never went anywhere.

Authored-by: Edward Kmett <ekmett@gmail.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoAdd type functions (-) and ToNat1; Turn FromNat1 into a closed family.
Iavor S. Diatchki [Tue, 24 Sep 2013 13:22:54 +0000 (06:22 -0700)] 
Add type functions (-) and ToNat1;  Turn FromNat1 into a closed family.

6 years agoAdd instance Monad (WrappedMonad m) to Control.Applicative (#8218)
Krzysztof Gogolewski [Mon, 23 Sep 2013 15:56:07 +0000 (17:56 +0200)] 
Add instance Monad (WrappedMonad m) to Control.Applicative (#8218)

6 years agoRemove obsolete pre-Haddock-2 `#hide` pragmas
Herbert Valerio Riedel [Sun, 22 Sep 2013 22:55:06 +0000 (00:55 +0200)] 
Remove obsolete pre-Haddock-2 `#hide` pragmas

The now obsolete (and redundant) `#hide` pragmas have been superseded by
`{-# OPTIONS_HADDOCK hide #-}` pragmas which are used by most of the
affected modules anyway.

This commit also adds proper `{-# OPTIONS_HADDOCK hide #-}` pragmas to
`GHC.Desugar` and `GHC.IO.Encoding.Iconv` which had only the ineffective
`#hide` annotation.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoAdd Haddock `/Since: 4.4.0.0/` comments to symbols
Herbert Valerio Riedel [Sun, 22 Sep 2013 20:04:55 +0000 (22:04 +0200)] 
Add Haddock `/Since: 4.4.0.0/` comments to symbols

This commit retroactively adds `/Since: 4.4.0.0/` annotations to symbols
newly added/exposed in `base-4.4.0.0` (as shipped with GHC 7.2.1).

See also 6368362f which adds the respective annotation for symbols newly
added in `base-4.7.0.0` (that goes together with GHC 7.8.1).

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoAdd Haddock `/Since: 4.5.[01].0/` comments to symbols
Herbert Valerio Riedel [Sun, 22 Sep 2013 14:59:08 +0000 (16:59 +0200)] 
Add Haddock `/Since: 4.5.[01].0/` comments to symbols

This commit retroactively adds `/Since: 4.5.[01].0/` annotations to symbols
newly added/exposed in `base-4.5.[01].0` (as shipped with GHC 7.4.[12]).

See also 6368362f which adds the respective annotation for symbols newly
added in `base-4.7.0.0` (that goes together with GHC 7.8.1).

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoAdd Haddock `/Since: 4.6.0.0/` comments to symbols
Herbert Valerio Riedel [Sat, 21 Sep 2013 16:04:19 +0000 (18:04 +0200)] 
Add Haddock `/Since: 4.6.0.0/` comments to symbols

This commit retroactively adds `/Since: 4.6.0.0/` annotations to symbols
newly added/exposed in `base-4.6.0.0` (as shipped with GHC 7.6.1).

See also 6368362f which adds the respective annotation for symbols newly
added in `base-4.7.0.0` (that goes together with GHC 7.8.1).

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoAdd Haddock `/Since: 4.7.0.0/` comments to new symbols
Herbert Valerio Riedel [Sat, 21 Sep 2013 12:16:45 +0000 (14:16 +0200)] 
Add Haddock `/Since: 4.7.0.0/` comments to new symbols

These annotations were added in such a way, that the line

{{{
/Since: 4.7.0.0/
}}}

represents the last paragraph of the Haddock comment.

Maybe Haddock will have support for this meta-syntax at some point, and
be able to inherited the since-version property to the children of an
annotated symbol and display the since-version property in the rendered
documentation only in cases when it's not visually obvious (for
instance, when re-exporting documentation strings).

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoAdd Haddock docs for new `class FiniteBits`
Herbert Valerio Riedel [Sat, 21 Sep 2013 12:10:32 +0000 (14:10 +0200)] 
Add Haddock docs for new `class FiniteBits`

6 years agoFollow changes in comparison primops (see #6135)
Jan Stolarek [Mon, 16 Sep 2013 14:16:31 +0000 (15:16 +0100)] 
Follow changes in comparison primops (see #6135)

6 years agoTrailing whitespaces
Jan Stolarek [Mon, 16 Sep 2013 15:05:48 +0000 (16:05 +0100)] 
Trailing whitespaces

6 years agoAdd `{-# MINIMAL #-}` annotations to typeclasses
Herbert Valerio Riedel [Wed, 18 Sep 2013 08:45:38 +0000 (10:45 +0200)] 
Add `{-# MINIMAL #-}` annotations to typeclasses

This makes use of the new `{-# MINIMAL #-}` facility (see #7633)
for the following typeclasses

 - `Bits`
 - `Foldable`
 - `Fractional`
 - `Num`
 - `MonadZip`
 - `Read`
 - `Show`
 - `Storable`
 - `Traversable`

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoUpdate use of role annotations to new syntax.
Richard Eisenberg [Fri, 13 Sep 2013 14:46:31 +0000 (10:46 -0400)] 
Update use of role annotations to new syntax.

6 years agoReplaced Text.Printf with extensible printf, and made comcommitant changes
Bart Massey [Mon, 16 Sep 2013 18:07:52 +0000 (11:07 -0700)] 
Replaced Text.Printf with extensible printf, and made comcommitant changes

Signed-off-by: Joachim Breitner <mail@joachim-breitner.de>
6 years agoMake `<Typeable.h>` obsolete and refactor away its use
Herbert Valerio Riedel [Sun, 15 Sep 2013 21:49:32 +0000 (23:49 +0200)] 
Make `<Typeable.h>` obsolete and refactor away its use

With GHC 7.8's PolyKinds the macros in `<Typeable.h>` are no longer of any
use, and their use is clearly obsolete. The sites using those macros are
replaced by auto-derivations of `Typeable` instances.

This reduces reliance on the CPP extension and the compile dependency on
`Typeable.h` in a couple of modules.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoConstant-fold `__GLASGOW_HASKELL__` CPP conditionals
Herbert Valerio Riedel [Sun, 15 Sep 2013 21:05:05 +0000 (23:05 +0200)] 
Constant-fold `__GLASGOW_HASKELL__` CPP conditionals

Now that HUGS and NHC specific code has been removed, this commit "folds"
the now redundant `#if((n)def)`s containing `__GLASGOW_HASKELL__`.  This
renders `base` officially GHC only.

This commit also removes redundant `{-# LANGUAGE CPP #-}`.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoRemove Hugs98 specific code
Herbert Valerio Riedel [Sun, 15 Sep 2013 08:58:00 +0000 (10:58 +0200)] 
Remove Hugs98 specific code

For rationale. see
 http://permalink.gmane.org/gmane.comp.lang.haskell.ghc.devel/2349

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoAdd Data.Bool.bool (fixes #8302)
Oliver Charles [Sun, 15 Sep 2013 00:23:56 +0000 (01:23 +0100)] 
Add Data.Bool.bool (fixes #8302)

6 years agobyteSwap16/32: Narrow the result to 16/32 bits
Reid Barton [Sun, 8 Sep 2013 01:07:30 +0000 (21:07 -0400)] 
byteSwap16/32: Narrow the result to 16/32 bits

According to primops.txt.pp, the BSwap16Op and BSwap32Op primops
leave the higher bytes of their results undefined. We must clear
those higher bytes here before storing the result in a Word16/32.

Signed-off-by: Austin Seipp <austin@well-typed.com>
6 years agoAdd `Data` instance for `Data.Version`
Herbert Valerio Riedel [Fri, 13 Sep 2013 09:19:36 +0000 (11:19 +0200)] 
Add `Data` instance for `Data.Version`

See also

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

Patch from Edward Kmett (essentially.)

Authored-by: Edward Kmett <ekmett@gmail.com>
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
6 years agoUpdate Git repo URL in `base.cabal`
Herbert Valerio Riedel [Wed, 11 Sep 2013 13:15:01 +0000 (15:15 +0200)] 
Update Git repo URL in `base.cabal`

This is related to #8121

6 years agoRedo <= with a type synonym instead of a class, add instance for boolean singletons...
Iavor S. Diatchki [Sun, 8 Sep 2013 21:38:47 +0000 (14:38 -0700)] 
Redo <= with a type synonym instead of a class, add instance for boolean singletons, remove (-)

6 years agoRevert "length001 passes now"
Austin Seipp [Sun, 8 Sep 2013 21:19:17 +0000 (16:19 -0500)] 
Revert "length001 passes now"

This reverts commit 1be0171fc8c911a7ce3d1e3926475e789d077724.

6 years agoRevert "GHC.Conc.Sync: Pass TSO to stackOverflow"
Austin Seipp [Sun, 8 Sep 2013 21:19:16 +0000 (16:19 -0500)] 
Revert "GHC.Conc.Sync: Pass TSO to stackOverflow"

This reverts commit 0cfba06e09cae209c6fc1f94edd815ccf5a7e9d7.

6 years agoEventManager: Gracefully handle an initial 'Finished' state (#8235)
Patrick Palka [Sun, 8 Sep 2013 16:22:01 +0000 (12:22 -0400)] 
EventManager: Gracefully handle an initial 'Finished' state (#8235)

Signed-off-by: Andreas Voellmy <andreas.voellmy@gmail.com>
6 years agolength001 passes now
Austin Seipp [Sun, 8 Sep 2013 08:52:48 +0000 (03:52 -0500)] 
length001 passes now

It no longer stack overflows, since the stack is infinite by default
now.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 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

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoSwitch IO manager to a mutable hashtable
Bryan O'Sullivan [Wed, 14 Aug 2013 10:43:36 +0000 (03:43 -0700)] 
Switch IO manager to a mutable hashtable

This data structure (IntTable) provides a similar API to its predecessor
(IntMap), at half the number of lines in size.

When tested in isolation using criterion, IntTable is much faster than
IntMap: over 15x, according to my criterion benchmarks.

This translates into a measurable improvement when used in the IO manager:
using weighttp to benchmark acme-http under various configurations on two
32-core Linux servers connected by a 10gbE network, I see between a 3%
and 10% increase in requests served per second compared to IntMap.

Signed-off-by: Andreas Voellmy <andreas.voellmy@gmail.com>
6 years agoFix off-by-one error in the IO manager
Patrick Palka [Sun, 1 Sep 2013 21:34:31 +0000 (17:34 -0400)] 
Fix off-by-one error in the IO manager

The last enabled event manager was being needlessly restarted after
increasing the number of capabilities at runtime.

6 years agoComments only
Jan Stolarek [Fri, 23 Aug 2013 07:49:28 +0000 (08:49 +0100)] 
Comments only

Add note for Integre constant folding

6 years agoRemove trailing whitespace from GHC.Fingerprint.*
Austin Seipp [Thu, 22 Aug 2013 21:31:42 +0000 (16:31 -0500)] 
Remove trailing whitespace from GHC.Fingerprint.*

Signed-off-by: Austin Seipp <aseipp@pobox.com>
6 years agoFix -Werror failure in GHC.Fingerprint
Austin Seipp [Thu, 22 Aug 2013 21:21:58 +0000 (16:21 -0500)] 
Fix -Werror failure in GHC.Fingerprint

Signed-off-by: Austin Seipp <aseipp@pobox.com>