packages/base.git
8 years agoMove Data.List tests to base/tests
Ian Lynagh [Sat, 19 Nov 2011 23:23:29 +0000 (23:23 +0000)] 
Move Data.List tests to base/tests

8 years agoWhitespce only in lexNum
Ian Lynagh [Sat, 19 Nov 2011 23:20:55 +0000 (23:20 +0000)] 
Whitespce only in lexNum

8 years agoMove lexNum to base/tests
Ian Lynagh [Sat, 19 Nov 2011 23:19:34 +0000 (23:19 +0000)] 
Move lexNum to base/tests

8 years agoWhitespace only in hash001 test
Ian Lynagh [Sat, 19 Nov 2011 23:14:21 +0000 (23:14 +0000)] 
Whitespace only in hash001 test

8 years agoMove hash001 to base/tests
Ian Lynagh [Sat, 19 Nov 2011 23:13:30 +0000 (23:13 +0000)] 
Move hash001 to base/tests

8 years agoWhitespace only in tests
Ian Lynagh [Sat, 19 Nov 2011 22:42:42 +0000 (22:42 +0000)] 
Whitespace only in tests

8 years agoMove testsuite/tests/lib/Numeric to base/tests
Ian Lynagh [Sat, 19 Nov 2011 22:37:56 +0000 (22:37 +0000)] 
Move testsuite/tests/lib/Numeric to base/tests

8 years agoMove testsuite/tests/lib/Show to base/tests
Ian Lynagh [Sat, 19 Nov 2011 22:26:41 +0000 (22:26 +0000)] 
Move testsuite/tests/lib/Show to base/tests

8 years agoMove testsuite/tests/lib/Data.Fixed test to base/tests
Ian Lynagh [Sat, 19 Nov 2011 22:17:33 +0000 (22:17 +0000)] 
Move testsuite/tests/lib/Data.Fixed test to base/tests

8 years agoMove lib/Char tests from testsuite to base
Ian Lynagh [Sat, 19 Nov 2011 22:07:24 +0000 (22:07 +0000)] 
Move lib/Char tests from testsuite to base

8 years agoRemove some comments about interfaces being checked against H98
Ian Lynagh [Sat, 19 Nov 2011 21:41:45 +0000 (21:41 +0000)] 
Remove some comments about interfaces being checked against H98

base doesn't follow Haskell 98

8 years agoMove CPUTime001 here from testsuite/tests/lib/CPUTime
Ian Lynagh [Sat, 19 Nov 2011 21:36:10 +0000 (21:36 +0000)] 
Move CPUTime001 here from testsuite/tests/lib/CPUTime

8 years agoGo back to using private-use characters in roundtripping
Max Bolingbroke [Fri, 18 Nov 2011 17:45:34 +0000 (17:45 +0000)] 
Go back to using private-use characters in roundtripping

8 years agoMake the fileSystemEncoding/localeEncoding/foreignEncoding mutable
Max Bolingbroke [Fri, 18 Nov 2011 17:40:55 +0000 (17:40 +0000)] 
Make the fileSystemEncoding/localeEncoding/foreignEncoding mutable

8 years agoAdd "dropWhileEnd", as discussed on the libraries list
Simon Marlow [Mon, 14 Nov 2011 12:40:03 +0000 (12:40 +0000)] 
Add "dropWhileEnd", as discussed on the libraries list

8 years agoAdd GHC.PArr.PArr to break a cycle in compiling Data.Array.Parallel
Manuel M T Chakravarty [Thu, 10 Nov 2011 08:09:49 +0000 (19:09 +1100)] 
Add GHC.PArr.PArr to break a cycle in compiling Data.Array.Parallel

8 years agofix typo
Simon Marlow [Wed, 9 Nov 2011 09:41:11 +0000 (09:41 +0000)] 
fix typo

8 years agoexport tyConName, tyConModule and tyConPackage; deprecate tyConString
Simon Marlow [Tue, 8 Nov 2011 14:47:13 +0000 (14:47 +0000)] 
export tyConName, tyConModule and tyConPackage; deprecate tyConString

8 years agoAdd unsafeShift to Data.Bits
Johan Tibell [Sun, 14 Aug 2011 10:45:27 +0000 (11:45 +0100)] 
Add unsafeShift to Data.Bits

This allows shifting by a non-statically known amount without
introducing a branch (to check for "overflow").

8 years agoexport flushAllHandles (#5594)
Simon Marlow [Mon, 7 Nov 2011 15:24:35 +0000 (15:24 +0000)] 
export flushAllHandles (#5594)

8 years agoadd unsafeFixIO (#5421)
Simon Marlow [Mon, 7 Nov 2011 09:19:09 +0000 (09:19 +0000)] 
add unsafeFixIO (#5421)

8 years agouse MVar to define fixIO, for thread-safety (see #5421)
Simon Marlow [Fri, 4 Nov 2011 15:27:39 +0000 (15:27 +0000)] 
use MVar to define fixIO, for thread-safety (see #5421)

8 years agoFix build on Windows
Max Bolingbroke [Wed, 2 Nov 2011 18:13:41 +0000 (18:13 +0000)] 
Fix build on Windows

8 years agoBe more forgiving about encoding name capitalization/hyphenization
Max Bolingbroke [Wed, 2 Nov 2011 13:46:24 +0000 (13:46 +0000)] 
Be more forgiving about encoding name capitalization/hyphenization

8 years agoAvoid using iconv for the locale TextEncoding if we can help it
Max Bolingbroke [Wed, 2 Nov 2011 13:44:17 +0000 (13:44 +0000)] 
Avoid using iconv for the locale TextEncoding if we can help it

8 years agoUpdate Debug.Trace haddock docs and rename putTraceMsg to traceIO
Duncan Coutts [Wed, 26 Oct 2011 12:37:18 +0000 (13:37 +0100)] 
Update Debug.Trace haddock docs and rename putTraceMsg to traceIO

putTraceMsg is deprecated in favour of traceIO. This makes the names
more consistent.

8 years agoAdd pure traceEvent and re-export from Debug.Trace
Duncan Coutts [Wed, 26 Oct 2011 12:33:48 +0000 (13:33 +0100)] 
Add pure traceEvent and re-export from Debug.Trace

Previously traceEvent was exported only from GHC.Exts and had an IO
type. The new scheme is:

  GHC.Exts.traceEventIO    :: String -> IO ()

  Debug.Trace.traceEventIO :: String -> IO ()
  Debug.Trace.traceEvent   :: String -> a -> a

The new traceEvent has a pure type like Debug.Trace.trace and can be
used in pure code. The previous GHC.Exts.traceEvent is deprecated.

8 years agoadd laws to class documentation
Ross Paterson [Wed, 26 Oct 2011 12:30:42 +0000 (13:30 +0100)] 
add laws to class documentation

8 years agoGHC.Stats: Use camelCase in public APIs
Johan Tibell [Wed, 26 Oct 2011 00:12:06 +0000 (17:12 -0700)] 
GHC.Stats: Use camelCase in public APIs

8 years agoUpdate base for latest Safe Haskell.
David Terei [Wed, 26 Oct 2011 03:43:23 +0000 (20:43 -0700)] 
Update base for latest Safe Haskell.

8 years agoUpdate base for new Safe Haskell design
David Terei [Tue, 25 Oct 2011 18:13:08 +0000 (11:13 -0700)] 
Update base for new Safe Haskell design

8 years agoWarn about ArrowLoop instance for Kleisli Arrows
Ross Paterson [Tue, 25 Oct 2011 15:47:46 +0000 (16:47 +0100)] 
Warn about ArrowLoop instance for Kleisli Arrows

Suggested by Heinrich Apfelmus on the libraries list.

8 years agoFix error in KQueue caused by changes to FFI import requirements
Max Bolingbroke [Fri, 21 Oct 2011 23:42:14 +0000 (00:42 +0100)] 
Fix error in KQueue caused by changes to FFI import requirements

8 years agoExport constructors for Foreign.C.Types and System.Posix.Types newtypes
Ian Lynagh [Thu, 20 Oct 2011 23:49:09 +0000 (00:49 +0100)] 
Export constructors for Foreign.C.Types and System.Posix.Types newtypes

Part of trac #5529. We also now import the constructors in various
modules that use them in FFI decls.

8 years agoIf an assertion fails, through it rather than a deeper error; fixes #5561
Ian Lynagh [Wed, 19 Oct 2011 21:23:19 +0000 (22:23 +0100)] 
If an assertion fails, through it rather than a deeper error; fixes #5561

An expression like
    assert False (throw e)
should throw the assertion failure rather than e

8 years agoupdate IO manager documentation (#5547)
Simon Marlow [Tue, 18 Oct 2011 09:48:48 +0000 (10:48 +0100)] 
update IO manager documentation (#5547)

8 years agoupdate ref to deprecated function forkIOUnmasked -> forkIOWithUnmask (#5546)
Simon Marlow [Tue, 18 Oct 2011 09:42:31 +0000 (10:42 +0100)] 
update ref to deprecated function forkIOUnmasked -> forkIOWithUnmask (#5546)

8 years agofix cross-ref to "Catching all exceptions" section (#5546)
Simon Marlow [Tue, 18 Oct 2011 09:42:04 +0000 (10:42 +0100)] 
fix cross-ref to "Catching all exceptions" section (#5546)

8 years agoFix build on Windows
Ian Lynagh [Fri, 14 Oct 2011 18:11:22 +0000 (19:11 +0100)] 
Fix build on Windows

8 years agoMerge branch 'master' of mac:ghc/git/val32/libraries/base
Ian Lynagh [Fri, 14 Oct 2011 02:12:08 +0000 (03:12 +0100)] 
Merge branch 'master' of mac:ghc/git/val32/libraries/base

8 years agotweak unpack/unpack_nl to generate better Core (#5536)
Simon Marlow [Thu, 13 Oct 2011 10:10:42 +0000 (11:10 +0100)] 
tweak unpack/unpack_nl to generate better Core (#5536)

8 years ago80-columnify
Simon Marlow [Wed, 12 Oct 2011 09:26:56 +0000 (10:26 +0100)] 
80-columnify

8 years agoDe-orphan the Show Integer instance
Ian Lynagh [Thu, 15 Sep 2011 21:14:17 +0000 (22:14 +0100)] 
De-orphan the Show Integer instance

8 years agoRemove the Eq superclass of Num
Ian Lynagh [Thu, 15 Sep 2011 21:03:19 +0000 (22:03 +0100)] 
Remove the Eq superclass of Num

8 years agoRemove the Show superclass of Num
Ian Lynagh [Thu, 15 Sep 2011 19:42:22 +0000 (20:42 +0100)] 
Remove the Show superclass of Num

8 years agoCombine two calls to 'ord' (seems to be just slightly faster)
Max Bolingbroke [Tue, 11 Oct 2011 12:43:26 +0000 (13:43 +0100)] 
Combine two calls to 'ord' (seems to be just slightly faster)

8 years agoImprove performance of the unpack loop
Max Bolingbroke [Tue, 11 Oct 2011 12:15:47 +0000 (13:15 +0100)] 
Improve performance of the unpack loop

8 years agoMinor: replace undefined uses with error as mentioned in ticket #5532
Ryan Newton [Thu, 6 Oct 2011 18:52:59 +0000 (14:52 -0400)] 
Minor: replace undefined uses with error as mentioned in ticket #5532

8 years agoRemove now unnecessary helper function
Daniel Fischer [Thu, 6 Oct 2011 09:16:39 +0000 (11:16 +0200)] 
Remove now unnecessary helper function

8 years agoMerge /home/dafis/GHC/bghc/libraries/base
Daniel Fischer [Tue, 4 Oct 2011 19:46:03 +0000 (21:46 +0200)] 
Merge /home/dafis/GHC/bghc/libraries/base

8 years agoFix typo in error message
Daniel Fischer [Tue, 4 Oct 2011 18:30:38 +0000 (20:30 +0200)] 
Fix typo in error message

8 years agoWhitespace only
Daniel Fischer [Tue, 4 Oct 2011 18:29:43 +0000 (20:29 +0200)] 
Whitespace only

8 years agoAlign arrows
Daniel Fischer [Tue, 4 Oct 2011 16:14:55 +0000 (18:14 +0200)] 
Align arrows

8 years agoEliminate unnecessary shift and reorder branches in fromRat''
Daniel Fischer [Tue, 4 Oct 2011 16:14:23 +0000 (18:14 +0200)] 
Eliminate unnecessary shift and reorder branches in fromRat''

8 years agoUse Rational constructor if numerator or denominator is 1
Daniel Fischer [Tue, 4 Oct 2011 15:17:31 +0000 (17:17 +0200)] 
Use Rational constructor if numerator or denominator is 1

8 years agoExplanatory comments
Daniel Fischer [Tue, 4 Oct 2011 15:15:11 +0000 (17:15 +0200)] 
Explanatory comments

8 years agoFix fromRat' and fromRat''
Daniel Fischer [Tue, 4 Oct 2011 14:31:36 +0000 (16:31 +0200)] 
Fix fromRat' and fromRat''

Due to a wrong order of tests, values near the normalised/denormalised
border were sent down the wrong branch. That led to rounding twice and
picking the wrong neighbour for some values.

fromRat' no longer uses scaleRat, if we're confident nobody uses that,
we could remove it.

8 years agoChange haddock for encodeFloat, fixes #5525
Daniel Fischer [Sun, 2 Oct 2011 14:38:15 +0000 (16:38 +0200)] 
Change haddock for encodeFloat, fixes #5525

8 years agoFixed mistake in documentation and a typo in a comment
Daniel Fischer [Sun, 2 Oct 2011 13:29:37 +0000 (15:29 +0200)] 
Fixed mistake in documentation and a typo in a comment

8 years agoFixed documentation bug
Daniel Fischer [Sun, 2 Oct 2011 12:42:41 +0000 (14:42 +0200)] 
Fixed documentation bug

8 years agoWhitespace only in GHC.Show
Daniel Fischer [Sun, 2 Oct 2011 12:38:50 +0000 (14:38 +0200)] 
Whitespace only in GHC.Show

8 years agoRemoved pointless rule (realToFrac :: Int -> Int)
Daniel Fischer [Sun, 2 Oct 2011 12:13:39 +0000 (14:13 +0200)] 
Removed pointless rule (realToFrac :: Int -> Int)

8 years agoDon't try to detect iconv or libcharset if we are on Windows
Ian Lynagh [Sun, 25 Sep 2011 15:20:35 +0000 (16:20 +0100)] 
Don't try to detect iconv or libcharset if we are on Windows

We don't use iconv or libcharset on Windows, but if configure finds
them then it can cause problems. So we don't even try looking if
we are on Windows.

See http://www.haskell.org/pipermail/cvs-ghc/2011-September/065980.html

Patch from Bill Tutt.

8 years agoFix #5436 by using 'recover' on handle EOF
Max Bolingbroke [Fri, 23 Sep 2011 14:24:36 +0000 (23:24 +0900)] 
Fix #5436 by using 'recover' on handle EOF

8 years agoBe more efficient reading fractional literals
Daniel Fischer [Mon, 19 Sep 2011 13:32:49 +0000 (15:32 +0200)] 
Be more efficient reading fractional literals

Avoid a few unnecessary gcds to speed up reading.

8 years agoWhitespace only in Text.Read.Lex
Daniel Fischer [Mon, 19 Sep 2011 10:41:38 +0000 (12:41 +0200)] 
Whitespace only in Text.Read.Lex

8 years agoUse the Ratio constructor for toRational from Int/Integer
Daniel Fischer [Mon, 19 Sep 2011 10:36:22 +0000 (12:36 +0200)] 
Use the Ratio constructor for toRational from Int/Integer

The denominator is always 1, so there's no need for gcd.

8 years agoGive Word a proper Show instance
Ian Lynagh [Fri, 16 Sep 2011 01:57:44 +0000 (02:57 +0100)] 
Give Word a proper Show instance

It was going via Integer before

8 years agoMove some Enum helpers into GHC.Enum
Ian Lynagh [Thu, 15 Sep 2011 18:18:04 +0000 (19:18 +0100)] 
Move some Enum helpers into GHC.Enum

They were in GHC.Word, but are also used in GHC.Int

8 years agoEliminate the orphaned Enum Integer instance
Ian Lynagh [Thu, 15 Sep 2011 17:46:17 +0000 (18:46 +0100)] 
Eliminate the orphaned Enum Integer instance

Also allows us to make GHC.Enum depend on GHC.Num rather than the
other way round.

8 years agoImport GMP-only functions from a GMP modules
Ian Lynagh [Tue, 13 Sep 2011 19:19:35 +0000 (20:19 +0100)] 
Import GMP-only functions from a GMP modules

8 years agoFix build on Windows
Ian Lynagh [Tue, 13 Sep 2011 15:58:24 +0000 (16:58 +0100)] 
Fix build on Windows

Now hsc2hs's template doesn't include HsFFI.h for us, we have
to do it ourselves.

8 years agoFIX BUILD on 32-bits
Daniel Fischer [Sat, 27 Aug 2011 15:38:17 +0000 (17:38 +0200)] 
FIX BUILD on 32-bits

popCount had the wrong type for Int64 on 32-bit systems.

8 years agoTrailing Whitespace
Daniel Fischer [Sat, 27 Aug 2011 15:37:19 +0000 (17:37 +0200)] 
Trailing Whitespace

8 years agoFollow ghc-prim changes
Ian Lynagh [Fri, 26 Aug 2011 20:37:47 +0000 (21:37 +0100)] 
Follow ghc-prim changes

8 years agoAdd Data.Bits.popCount
Johan Tibell [Tue, 23 Aug 2011 12:58:13 +0000 (14:58 +0200)] 
Add Data.Bits.popCount

8 years agoFix documentation for withCWStringLen (#5396)
Simon Marlow [Thu, 25 Aug 2011 09:41:43 +0000 (10:41 +0100)] 
Fix documentation for withCWStringLen (#5396)

8 years agoDrop bitrotted code for < 32-bit platforms
Johan Tibell [Wed, 24 Aug 2011 09:45:47 +0000 (11:45 +0200)] 
Drop bitrotted code for < 32-bit platforms

8 years agoRemove old darcs boring file
David Terei [Wed, 10 Aug 2011 19:23:57 +0000 (12:23 -0700)] 
Remove old darcs boring file

8 years agoDelete stray comma in doc for encodeFloat
Daniel Fischer [Sun, 7 Aug 2011 14:31:25 +0000 (16:31 +0200)] 
Delete stray comma in doc for encodeFloat

8 years agoExpand documentation for RealFloat. Part of #3898.
Daniel Fischer [Sun, 7 Aug 2011 12:31:54 +0000 (14:31 +0200)] 
Expand documentation for RealFloat. Part of #3898.

Elaborated on the behaviour of decodeFloat, siginficand and exponent for the
edge cases, infinities, NaNs and -0.0, also clarified the sense in which
encodeFloat is the inverse of decodeFloat.

For exponent, the matter was simply incorrect documentation.
For decodeFloat/encodeFloat, there is the fundamental problem of
finding out what the right behaviour is. Currently, decodeFloat
treats infinities and NaNs as if they were finite values.
The only viable alternative seems to be raising an error,
but that could make some programmes unnecessarily fail, since
the current behaviour can be correct and harmless for infinities
(the behaviour on NaN however is bad). Also, testing for finiteness
would have performance implications.

For the time being, the docs say behaviour is unspecified on
infinities and NaNs.

8 years agoMerge branch 'master' of /home/dafis/GHC/./ghc//libraries/base
Daniel Fischer [Sun, 7 Aug 2011 08:47:24 +0000 (10:47 +0200)] 
Merge branch 'master' of /home/dafis/GHC/./ghc//libraries/base

8 years agoUnbox all GCStats fields, also add cpu_seconds and wall_seconds.
Edward Z. Yang [Sat, 6 Aug 2011 15:19:09 +0000 (11:19 -0400)] 
Unbox all GCStats fields, also add cpu_seconds and wall_seconds.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
8 years agoTrailing whitespace
Daniel Fischer [Wed, 27 Jul 2011 19:18:15 +0000 (21:18 +0200)] 
Trailing whitespace

8 years agoMerge branch 'master' of /home/dafis/GHC/./ghc//libraries/base
Daniel Fischer [Mon, 1 Aug 2011 13:12:49 +0000 (15:12 +0200)] 
Merge branch 'master' of /home/dafis/GHC/./ghc//libraries/base

8 years agoRemove some antiquated C constructs
Ian Lynagh [Mon, 1 Aug 2011 00:08:28 +0000 (01:08 +0100)] 
Remove some antiquated C constructs

Fixes validate on amd64/Linux with:

SRC_CC_OPTS += -Wmissing-parameter-type
SRC_CC_OPTS += -Wold-style-declaration
SRC_CC_OPTS += -Wold-style-definition

8 years agoFix the behaviour of scaleFloat; part of #3898
Ian Lynagh [Sun, 31 Jul 2011 19:41:25 +0000 (20:41 +0100)] 
Fix the behaviour of scaleFloat; part of #3898

Patch from Daniel Fischer.

8 years agoMerge branch 'master' of /home/dafis/GHC/./ghc//libraries/base
Daniel Fischer [Sun, 31 Jul 2011 13:44:36 +0000 (15:44 +0200)] 
Merge branch 'master' of /home/dafis/GHC/./ghc//libraries/base

8 years agoMerge branch 'master' of /home/dafis/GHC/./ghc//libraries/base
Daniel Fischer [Sun, 31 Jul 2011 08:28:36 +0000 (10:28 +0200)] 
Merge branch 'master' of /home/dafis/GHC/./ghc//libraries/base

8 years agoWarning police
Manuel M T Chakravarty [Sun, 31 Jul 2011 08:22:45 +0000 (18:22 +1000)] 
Warning police

8 years agoNew GHC.Stats module for accessing GC statistics.
Edward Z. Yang [Sat, 30 Jul 2011 21:01:22 +0000 (17:01 -0400)] 
New GHC.Stats module for accessing GC statistics.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
8 years agoMerge branch 'master' of /home/dafis/GHC/./ghc//libraries/base
Daniel Fischer [Fri, 29 Jul 2011 13:33:58 +0000 (15:33 +0200)] 
Merge branch 'master' of /home/dafis/GHC/./ghc//libraries/base

8 years agoRemove unnecessary import (Windows only)
Simon Peyton Jones [Fri, 29 Jul 2011 10:19:42 +0000 (11:19 +0100)] 
Remove unnecessary import (Windows only)

...and add a comment

8 years agoData.Bits: specialise shift[LR] for instance Bits
Liyang HU [Fri, 22 Jul 2011 10:47:36 +0000 (19:47 +0900)] 
Data.Bits: specialise shift[LR] for instance Bits

Documentation notes that the second arg of shift[LR] must be positive,
yet many definitions of instance Bits rely on the class default, which
performs an unnecessary sign check.

8 years agoMerge branch 'master' of /home/dafis/GHC/./ghc//libraries/base
Daniel Fischer [Thu, 28 Jul 2011 12:54:43 +0000 (14:54 +0200)] 
Merge branch 'master' of /home/dafis/GHC/./ghc//libraries/base

8 years agoRemove now-unnecessary import of GHC.Show
Simon Peyton Jones [Thu, 28 Jul 2011 07:35:55 +0000 (08:35 +0100)] 
Remove now-unnecessary import of GHC.Show

8 years agoRemove import of GHC.Show from IOBase.hs
Daniel Fischer [Wed, 27 Jul 2011 19:19:13 +0000 (21:19 +0200)] 
Remove import of GHC.Show from IOBase.hs

8 years agoTrailing whitespace
Daniel Fischer [Wed, 27 Jul 2011 19:18:15 +0000 (21:18 +0200)] 
Trailing whitespace

8 years agoAdd newline to the end of Control/Monad/Zip.hs
Ian Lynagh [Wed, 27 Jul 2011 13:59:02 +0000 (14:59 +0100)] 
Add newline to the end of Control/Monad/Zip.hs

Fixes problems in some configurations (old versions of cpp?).

8 years agoRemove mention of setUncaughtExceptionHandler from forkIO.
Edward Z. Yang [Wed, 27 Jul 2011 03:08:16 +0000 (23:08 -0400)] 
Remove mention of setUncaughtExceptionHandler from forkIO.

First of all, the 'forkIO' mechanism doesn't use
'setUncaughtExceptionHandler' to install the masking
handler: it uses 'catchException'.  Second of all,
'setUncaughtExceptionHandler' is undocumented, global, and
wouldn't even work for the intended purpose!

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