packages/base.git
8 years agoFollow toInt# -> integerToInt renaming
Ian Lynagh [Sat, 23 Jul 2011 12:30:45 +0000 (13:30 +0100)] 
Follow toInt# -> integerToInt renaming

8 years agoTweak the typeable fingerprinting
Ian Lynagh [Fri, 22 Jul 2011 22:01:10 +0000 (23:01 +0100)] 
Tweak the typeable fingerprinting

Put spaces inbetween the values, so e.g.
    p:Foobar.baz
    p:Foo.barbaz
will hash differently.

8 years agoSync the typeable fingerprinting with GHC
Ian Lynagh [Fri, 22 Jul 2011 21:57:19 +0000 (22:57 +0100)] 
Sync the typeable fingerprinting with GHC

8 years agoGHC.Classes has moved to ghc-prim
Ian Lynagh [Fri, 22 Jul 2011 16:45:19 +0000 (17:45 +0100)] 
GHC.Classes has moved to ghc-prim

8 years agoMake Typeable safe now that handcrafted instances aren't allowed.
David Terei [Wed, 20 Jul 2011 23:28:43 +0000 (16:28 -0700)] 
Make Typeable safe now that handcrafted instances aren't allowed.

8 years agoDEPRECATE typeRepKey
Simon Marlow [Thu, 14 Jul 2011 14:51:40 +0000 (15:51 +0100)] 
DEPRECATE typeRepKey

8 years agogive instances of Ord for TyCon and TypeRep
Simon Marlow [Thu, 14 Jul 2011 14:51:28 +0000 (15:51 +0100)] 
give instances of Ord for TyCon and TypeRep

8 years agoImplement unsafeLocalState by unsafeDupablePerformIO, not
Simon Marlow [Mon, 11 Jul 2011 09:01:02 +0000 (10:01 +0100)] 
Implement unsafeLocalState by unsafeDupablePerformIO, not
unsafePerformIO.  The latter is more efficient, and will work
correctly for clients that are using unsafeLocalState for its
documented uses.

8 years agoexport unsafeDupablePerformIO
Simon Marlow [Mon, 11 Jul 2011 08:59:02 +0000 (09:59 +0100)] 
export unsafeDupablePerformIO

8 years agosmall tweaks to docs
Simon Marlow [Mon, 11 Jul 2011 08:58:48 +0000 (09:58 +0100)] 
small tweaks to docs

8 years agoMove the munzip function in the Zip type class;
George Giorgidze [Mon, 4 Jul 2011 19:01:12 +0000 (21:01 +0200)] 
Move the munzip function in the Zip type class;

8 years agoIn the deprecation warning for mkTyCon, suggest deriving Typeable.
Simon Marlow [Mon, 11 Jul 2011 12:47:13 +0000 (13:47 +0100)] 
In the deprecation warning for mkTyCon, suggest deriving Typeable.

8 years agofix warnings (including moving things around to avoid orphan
Simon Marlow [Mon, 11 Jul 2011 11:59:49 +0000 (12:59 +0100)] 
fix warnings (including moving things around to avoid orphan
instances)

8 years agofix warning
Simon Marlow [Fri, 8 Jul 2011 15:49:15 +0000 (16:49 +0100)] 
fix warning

8 years agoTypeable overhaul (see #5275)
Simon Marlow [Fri, 8 Jul 2011 09:39:24 +0000 (10:39 +0100)] 
Typeable overhaul (see #5275)

Instances of Typeable used to call mkTyCon:

  mkTyCon :: String -> TyCon

which internally kept a table mapping Strings to Ints, so that each
TyCon could be given a unique Int for fast comparison.  This meant the
String has to be unique across all types in the program.  However,
derived instances of typeable used the qualified original
name (e.g. "GHC.Types.Int") which is not necessarily unique, is
non-portable, and exposes implementation details.

The String passed to mkTyCon is returned by

  tyConString :: TyCon -> String

which let the user get at this non-portable representation (also the
Show instance returns this String).

Now we store three Strings in TyCon.  The internal representation is
this:

data TyCon = TyCon {
   tyConHash    :: {-# UNPACK #-} !Fingerprint,
   tyConPackage :: String,
   tyConModule  :: String,
   tyConName    :: String
 }

(internal representations are now provided by Data.Typeable.Internal)

The fields of TyCon are not exposed via the public API.  Together the
three fields tyConPackage, tyConModule and tyConName uniquely identify
a TyCon, and the Fingerprint is a hash of the concatenation of these
three Strings (so no more internal cache to map strings to unique
Ids). tyConString now returns the value of tyConName only, so is
therefore portable (but the String returned does not uniquely
identify the TyCon).

I've measured the performance impact of this change, and performance
seems to be uniformly better.  This should improve things for SYB in
particular.  Also, the size of the code generated for deriving
Typeable is less than half as much as before.

== API changes ==

=== mkTyCon is DEPRECATED ==

mkTyCon is used by some hand-written instances of Typeable.  It still
works as before, but is deprecated in favour of...

=== Add mkTyCon3 ===

  mkTyCon3 :: String -> String -> String -> TyCon

mkTyCon3 takes the package, module, and name of the TyCon respectively.
Most users can just derive Typeable, there's no need to use mkTyCon3.

In due course we can rename mkTyCon3 back to mkTyCon.

=== typeRepKey changed ===

Previously we had

  typeRepKey :: TypeRep -> IO Int

but since we don't assign unique Ints to TypeReps any more, this is
difficult to implement.  Instead we provide an abstract key type which
is an instance of Eq and Ord, and internally is implemented by the
fingerprint:

  data TypeRepKey -- abstract, instance of Eq, Ord
  typeRepKey :: TypeRep -> IO TypeRepKey

typeRepKey is still in the IO monad, because the Ord instance is
implementation-defined.

8 years agoCorrect a comment
Ian Lynagh [Thu, 7 Jul 2011 18:09:22 +0000 (19:09 +0100)] 
Correct a comment

8 years agoFix a typo
Ian Lynagh [Thu, 7 Jul 2011 17:17:30 +0000 (18:17 +0100)] 
Fix a typo

8 years agoRemove some legacy comments
Ian Lynagh [Thu, 7 Jul 2011 15:08:47 +0000 (16:08 +0100)] 
Remove some legacy comments

8 years agoForeign.Marshal now reexports Foreign.Marshal.Safe
Ian Lynagh [Thu, 7 Jul 2011 14:38:42 +0000 (15:38 +0100)] 
Foreign.Marshal now reexports Foreign.Marshal.Safe

Rather than duplicating the list of things that Foreign.Marshal.Safe
reexports.

8 years agoBump version number
Ian Lynagh [Thu, 7 Jul 2011 01:57:20 +0000 (02:57 +0100)] 
Bump version number

8 years agoFix a copy-and-paste-o
Ian Lynagh [Thu, 7 Jul 2011 01:13:04 +0000 (02:13 +0100)] 
Fix a copy-and-paste-o

8 years agoMake the calls to 'error' more informative (Trac #5274)
Simon Peyton Jones [Fri, 1 Jul 2011 16:59:57 +0000 (17:59 +0100)] 
Make the calls to 'error' more informative (Trac #5274)

8 years agoFix some haddock markup
Ian Lynagh [Wed, 29 Jun 2011 19:41:17 +0000 (20:41 +0100)] 
Fix some haddock markup

Spotted by mbuf on #haskell, reported by Ivan Lazar Miljenovic.

8 years agouse seq# as the implementation of evaluate (see #5129)
Simon Marlow [Wed, 29 Jun 2011 10:52:30 +0000 (11:52 +0100)] 
use seq# as the implementation of evaluate (see #5129)

8 years agoFix a comment about splitAt (fixes #1182).
Michal Terepeta [Mon, 20 Jun 2011 19:05:11 +0000 (21:05 +0200)] 
Fix a comment about splitAt (fixes #1182).

8 years agoAdd a test for quot/rem/div/mod overflow
Ian Lynagh [Sun, 26 Jun 2011 12:02:21 +0000 (13:02 +0100)] 
Add a test for quot/rem/div/mod overflow

8 years agoFix quoteRem, rem, divMod and mod definitions
Ian Lynagh [Sun, 26 Jun 2011 01:41:16 +0000 (02:41 +0100)] 
Fix quoteRem, rem, divMod and mod definitions

We now have, e.g.,
    maxBound `rem` (-1) == 0
rather than raising overflowError.

8 years agoFix build on Windows
Ian Lynagh [Mon, 20 Jun 2011 19:20:01 +0000 (20:20 +0100)] 
Fix build on Windows

8 years agoSafeHaskell: Added SafeHaskell to base
David Terei [Mon, 16 May 2011 21:57:46 +0000 (14:57 -0700)] 
SafeHaskell: Added SafeHaskell to base

8 years agoOnly the type definition of '[::]' (which is wired in) remains in 'GHC.PArr'.
Manuel M T Chakravarty [Fri, 17 Jun 2011 07:21:19 +0000 (17:21 +1000)] 
Only the type definition of '[::]' (which is wired in) remains in 'GHC.PArr'.

8 years agoNew gcd documentation
Daniel Fischer [Sun, 29 May 2011 17:33:57 +0000 (19:33 +0200)] 
New gcd documentation

Based on Ross Paterson's suggestion, a short explanation of the
meaning of gcd, and a mention of possible negative results.

8 years agoFix suseconds configure test on Windows
Ian Lynagh [Sun, 12 Jun 2011 13:25:24 +0000 (14:25 +0100)] 
Fix suseconds configure test on Windows

8 years agoAdjust behaviour of gcd
Daniel Fischer [Tue, 17 May 2011 20:53:40 +0000 (22:53 +0200)] 
Adjust behaviour of gcd

Change behaviour of 'gcd 0 0' from raising an exception to
returning 0 to make it total and conform to mathematical practice.

8 years agoconfigure: fail if suseconds_t doesn't exist, except on Windows
Ian Lynagh [Sun, 12 Jun 2011 12:05:03 +0000 (13:05 +0100)] 
configure: fail if suseconds_t doesn't exist, except on Windows

On Windows we use Int32.

8 years agoIn configure, set $WINDOWS to YES or NO
Ian Lynagh [Sun, 12 Jun 2011 11:59:04 +0000 (12:59 +0100)] 
In configure, set $WINDOWS to YES or NO

rather than inlining the implementation of the test.

8 years agoRefactor the FPTOOLS_CHECK_HTYPE macro
Ian Lynagh [Sun, 12 Jun 2011 11:54:48 +0000 (12:54 +0100)] 
Refactor the FPTOOLS_CHECK_HTYPE macro

We can now specify what happens if the type doesn't exist

8 years agoIn configure, remove default Haskell equivalent of C types
Ian Lynagh [Sun, 12 Jun 2011 11:48:31 +0000 (12:48 +0100)] 
In configure, remove default Haskell equivalent of C types

The macro was just ignoring the defaults.

8 years agoRemove wint_t configure test
Ian Lynagh [Sat, 11 Jun 2011 23:19:51 +0000 (00:19 +0100)] 
Remove wint_t configure test

We didn't actually use the result, and my Linux box doesn't have
wint_t.

8 years agoUse CSUSeconds in getCPUTime and getCurrentTime. Fixes #4247.
William Knop [Tue, 5 Apr 2011 01:01:39 +0000 (21:01 -0400)] 
Use CSUSeconds in getCPUTime and getCurrentTime. Fixes #4247.

The tv_usec field of struct timeval was incorrectly used as C type time_t; the actual C type is suseconds_t. On OS X, time_t is longer than suseconds_t, which caused garbage bits to be copied as reported in trace #4247 and #4970. This is patch 3 of 4 to fix those tickets.

8 years agoWhitespace only. This patch is part 2 of 4 for trac #4247 and #4970.
William Knop [Tue, 5 Apr 2011 00:40:06 +0000 (20:40 -0400)] 
Whitespace only. This patch is part 2 of 4 for trac #4247 and #4970.

8 years agoAdd Haskell types for C types useconds_t and suseconds_t, which are respectively...
William Knop [Tue, 5 Apr 2011 00:24:36 +0000 (20:24 -0400)] 
Add Haskell types for C types useconds_t and suseconds_t, which are respectively CUSeconds and CSUSeconds.

The tv_usec field of struct timeval was incorrectly used as C type time_t; the actual C type is suseconds_t. On OS X, time_t is longer than suseconds_t, which caused garbage bits to be copied as reported in trac #4247 and #4970. This patch is part 1 of 4 to fix those tickets.

8 years agoMake 'forever' inlinable (fixes Trac #5205)
Simon Peyton Jones [Thu, 9 Jun 2011 19:44:21 +0000 (20:44 +0100)] 
Make 'forever' inlinable (fixes Trac #5205)

See Note [Make forever INLINABLE] in Control.Monad

8 years agoMerge remote branch 'origin/master' into ghc-generics
Simon Peyton Jones [Thu, 26 May 2011 13:33:23 +0000 (14:33 +0100)] 
Merge remote branch 'origin/master' into ghc-generics

8 years agoMerge branch 'ghc-generics' of http://darcs.haskell.org/packages/base into ghc-generics
Simon Peyton Jones [Wed, 25 May 2011 06:54:29 +0000 (07:54 +0100)] 
Merge branch 'ghc-generics' of darcs.haskell.org/packages/base into ghc-generics

8 years agoRemove datatype contexts from base
Ian Lynagh [Tue, 24 May 2011 22:26:00 +0000 (23:26 +0100)] 
Remove datatype contexts from base

The Haskell' committee decided to remove datatype contexts from the language:
http://www.haskell.org/pipermail/haskell-prime/2011-January/003335.html

8 years agoadd final newline
Simon Marlow [Mon, 23 May 2011 10:19:55 +0000 (11:19 +0100)] 
add final newline

8 years agodocument the behaviour of throwTo to the current thread (#4888)
Simon Marlow [Tue, 24 May 2011 10:02:52 +0000 (11:02 +0100)] 
document the behaviour of throwTo to the current thread (#4888)

8 years agodocument the memory model of IORef
Simon Marlow [Tue, 24 May 2011 10:02:29 +0000 (11:02 +0100)] 
document the memory model of IORef

8 years agodocs: note strict sequential ordering of MVar operations
Simon Marlow [Thu, 19 May 2011 14:46:30 +0000 (15:46 +0100)] 
docs: note strict sequential ordering of MVar operations

8 years agoAdd System.IO.char8, the encoding used by openBinaryFile,
Simon Marlow [Tue, 5 Apr 2011 08:57:22 +0000 (09:57 +0100)] 
Add System.IO.char8, the encoding used by openBinaryFile,
and correct the documentation for hSetBinaryMode which claimed that
it was using the latin1 encoding when in fact it was using an
unchecked modulo-256 version of it.

8 years agoMove tests from testsuite/tests/libraries
Ian Lynagh [Sun, 8 May 2011 21:04:51 +0000 (22:04 +0100)] 
Move tests from testsuite/tests/libraries

8 years agoAdd tests from testsuite/tests/h98
Ian Lynagh [Sun, 8 May 2011 20:14:09 +0000 (21:14 +0100)] 
Add tests from testsuite/tests/h98

8 years agoMerge branch 'master' of http://darcs.haskell.org/packages/base into ghc-generics
Jose Pedro Magalhaes [Fri, 20 May 2011 18:15:48 +0000 (20:15 +0200)] 
Merge branch 'master' of darcs.haskell.org/packages/base into ghc-generics

8 years agoMerge remote branch 'origin/master' into ghc-generics
Simon Peyton Jones [Thu, 19 May 2011 07:38:35 +0000 (08:38 +0100)] 
Merge remote branch 'origin/master' into ghc-generics

8 years agoChange to the 0xEF80..0xEFFF private-use range for //ROUNDTRIP
Max Bolingbroke [Wed, 18 May 2011 22:13:30 +0000 (23:13 +0100)] 
Change to the 0xEF80..0xEFFF private-use range for //ROUNDTRIP

8 years agoUse Unicode private-use characters for roundtripping
Max Bolingbroke [Wed, 18 May 2011 08:41:49 +0000 (09:41 +0100)] 
Use Unicode private-use characters for roundtripping

This replaces the previous scheme (which used lone surrogates). The reason is that
there is Haskell software in the wild (i.e. the text package) that chokes on Char values
that do not represent Unicode characters.

This new approach will not work correctly if the reserved private-use characters are
actually encountered in the input, but we expect this to be rare.

8 years agoMerge branch 'master' of http://darcs.haskell.org/packages/base into ghc-generics
Jose Pedro Magalhaes [Tue, 17 May 2011 06:51:23 +0000 (08:51 +0200)] 
Merge branch 'master' of darcs.haskell.org/packages/base into ghc-generics

8 years agoBig patch to improve Unicode support in GHC. Validated on OS X and Windows, this
Max Bolingbroke [Sat, 14 May 2011 21:50:46 +0000 (22:50 +0100)] 
Big patch to improve Unicode support in GHC. Validated on OS X and Windows, this
patch series fixes #5061, #1414, #3309, #3308, #3307, #4006 and #4855.

The major changes are:

 1) Make Foreign.C.String.*CString use the locale encoding

    This change follows the FFI specification in Haskell 98, which
    has never actually been implemented before.

    The functions exported from Foreign.C.String are partially-applied
    versions of those from GHC.Foreign, which allows the user to supply
    their own TextEncoding.

    We also introduce foreignEncoding as the name of the text encoding
    that follows the FFI appendix in that it transliterates encoding
    errors.

 2) I also changed the code so that mkTextEncoding always tries the
    native-Haskell decoders in preference to those from iconv, even on
    non-Windows. The motivation here is simply that it is better for
    compatibility if we do this, and those are the ones you get for
    the utf* and latin1* predefined TextEncodings anyway.

 3) Implement surrogate-byte error handling mode for TextEncoding

    This implements PEP383-like behaviour so that we are able to
    roundtrip byte strings through Strings without loss of information.

    The withFilePath function now uses this encoding to get to/from CStrings,
    so any code that uses that will get the right PEP383 behaviour automatically.

 4) Implement three other coding failure modes: ignore, throw error, transliterate

    These mimic the behaviour of the GNU Iconv extensions.

8 years agoMerge branch 'master' of http://darcs.haskell.org/packages/base into ghc-generics
Jose Pedro Magalhaes [Thu, 12 May 2011 11:20:48 +0000 (13:20 +0200)] 
Merge branch 'master' of darcs.haskell.org/packages/base into ghc-generics

8 years agodisable incorrect RULEs for Floats (#5178)
Simon Marlow [Tue, 10 May 2011 09:46:45 +0000 (10:46 +0100)] 
disable incorrect RULEs for Floats (#5178)

8 years agoAdapt to the renaming of `Representable0` to `Generic`.
Jose Pedro Magalhaes [Mon, 9 May 2011 07:47:29 +0000 (09:47 +0200)] 
Adapt to the renaming of `Representable0` to `Generic`.

8 years agoMerge branch 'master' of http://darcs.haskell.org/packages/base into ghc-generics
Jose Pedro Magalhaes [Wed, 4 May 2011 19:09:29 +0000 (21:09 +0200)] 
Merge branch 'master' of darcs.haskell.org/packages/base into ghc-generics

8 years agoMerge branch 'monad-comp'
Simon Peyton Jones [Wed, 4 May 2011 15:38:41 +0000 (16:38 +0100)] 
Merge branch 'monad-comp'

8 years agoAdd Representable0 instances to Either and Maybe.
Jose Pedro Magalhaes [Wed, 4 May 2011 09:18:46 +0000 (11:18 +0200)] 
Add Representable0 instances to Either and Maybe.

8 years agoMove Eq and Ord for Int from GHC.Base to GHC.Classes, so they are not longer orphan.
Jose Pedro Magalhaes [Tue, 3 May 2011 13:40:33 +0000 (15:40 +0200)] 
Move Eq and Ord for Int from GHC.Base to GHC.Classes, so they are not longer orphan.

Put Eq and Ord instances for Arity, Associativity, and Fixity in GHC.Classes, Show instances in GHC.Show, and Read instances in GHC.Read.

8 years agoMoved the CString functions to GHC.CString in ghc-prim (needed for the new generic...
Jose Pedro Magalhaes [Tue, 3 May 2011 09:50:30 +0000 (11:50 +0200)] 
Moved the CString functions to GHC.CString in ghc-prim (needed for the new generic deriving mechanism).

Import and re-export GHC.CString from GHC.Base.

8 years agoMerge branch 'master' of http://darcs.haskell.org/packages/base into ghc-generics
Jose Pedro Magalhaes [Mon, 2 May 2011 19:13:19 +0000 (21:13 +0200)] 
Merge branch 'master' of darcs.haskell.org/packages/base into ghc-generics

Solved conflicts:
GHC/Int.hs

8 years agoComment the generics stuff instances in GHC.Int, for now.
Jose Pedro Magalhaes [Mon, 2 May 2011 18:50:35 +0000 (20:50 +0200)] 
Comment the generics stuff instances in GHC.Int, for now.

8 years agoAdd a note about the definition of quot etc
Ian Lynagh [Sat, 30 Apr 2011 14:52:57 +0000 (15:52 +0100)] 
Add a note about the definition of quot etc

Based on Simon PJ's text in #5161.

8 years agoAdd GHC.Event.getSystemEventManager :: IO (Maybe EventManager)
Bas van Dijk [Mon, 4 Apr 2011 18:22:09 +0000 (20:22 +0200)] 
Add GHC.Event.getSystemEventManager :: IO (Maybe EventManager)

8 years agoPerformance improvement for division: got rid of an unnecessary branching in cases...
Denys Rtveliashvili [Thu, 28 Apr 2011 07:45:10 +0000 (08:45 +0100)] 
Performance improvement for division: got rid of an unnecessary branching in cases where the second argument is a constant and is not -1.

8 years agomonad comprehensions: Group and Zip monad monad-comp
Nils Schweinsberg [Fri, 29 Apr 2011 16:16:56 +0000 (18:16 +0200)] 
monad comprehensions: Group and Zip monad

ticket #4370

8 years agoAdd instances for basic types of the new generic deriving mechanism.
Jose Pedro Magalhaes [Fri, 29 Apr 2011 06:46:08 +0000 (08:46 +0200)] 
Add instances for basic types of the new generic deriving mechanism.

8 years agoMerge branch 'master' of http://darcs.haskell.org/packages/base into ghc-generics
Jose Pedro Magalhaes [Wed, 27 Apr 2011 11:21:02 +0000 (13:21 +0200)] 
Merge branch 'master' of darcs.haskell.org/packages/base into ghc-generics

8 years agoRemove a redundant -fno-warn-unused-binds flag
Ian Lynagh [Sun, 24 Apr 2011 21:04:10 +0000 (22:04 +0100)] 
Remove a redundant -fno-warn-unused-binds flag

8 years agoRemove an unnecessary -fno-warn-unused-binds flag
Ian Lynagh [Sun, 24 Apr 2011 19:32:07 +0000 (20:32 +0100)] 
Remove an unnecessary -fno-warn-unused-binds flag

8 years agoFor GHC, implement the Typeable.hs macros using standalone deriving
Ian Lynagh [Sun, 24 Apr 2011 18:16:52 +0000 (19:16 +0100)] 
For GHC, implement the Typeable.hs macros using standalone deriving

As well as being more pleasant, this fixes #1841:
    Data.Typeable: Instances of basic types don't provide qualified
    strings to mkTyCon

8 years agoFix build on 64bit machines
Ian Lynagh [Fri, 22 Apr 2011 17:42:23 +0000 (18:42 +0100)] 
Fix build on 64bit machines

8 years agoPart of #5122 "Faster conversion between Rational and Double/Float" fix
Ian Lynagh [Fri, 22 Apr 2011 14:24:21 +0000 (15:24 +0100)] 
Part of #5122 "Faster conversion between Rational and Double/Float" fix

From daniel.is.fischer.

8 years agoUpdate comment on fmapDefault to note that it only works for Traversable instances...
Brent Yorgey [Fri, 15 Apr 2011 19:22:54 +0000 (15:22 -0400)] 
Update comment on fmapDefault to note that it only works for Traversable instances with a given definition of traversable, and NOT for instances with only sequenceA given.

8 years agoImprove docs for GHC.IO.FD.openFile
Simon Marlow [Fri, 1 Apr 2011 11:15:50 +0000 (12:15 +0100)] 
Improve docs for GHC.IO.FD.openFile

8 years agoInitial commit for Pedro's generic-default mechanism
simonpj [Tue, 12 Apr 2011 16:48:42 +0000 (17:48 +0100)] 
Initial commit for Pedro's generic-default mechanism

8 years agoUpdate source repo location to be the git repo in .cabal file
Ian Lynagh [Fri, 8 Apr 2011 10:22:28 +0000 (11:22 +0100)] 
Update source repo location to be the git repo in .cabal file

8 years agoRemoved Show instance for IOCallback and FdData The IOCallback instance conflicts...
Bas van Dijk [Mon, 4 Apr 2011 18:53:24 +0000 (20:53 +0200)] 
Removed Show instance for IOCallback and FdData The IOCallback instance conflicts with the more general instance Show (a -> b) defined in Text.Show.Functions

8 years agoSwap FP_COMMUTE_INT argument order to match AC_COMPUTE_INT
Ian Lynagh [Wed, 6 Apr 2011 20:44:34 +0000 (21:44 +0100)] 
Swap FP_COMMUTE_INT argument order to match AC_COMPUTE_INT

The first 2 arguments are in the opposite order for _AC_COMPUTE_INT

8 years agoUse FP_COMPUTE_INT rather than AC_COMPUTE_INT
Ian Lynagh [Wed, 6 Apr 2011 19:39:42 +0000 (20:39 +0100)] 
Use FP_COMPUTE_INT rather than AC_COMPUTE_INT

The latter isn't supported by all versions of autoconf (e.g.
whatever SPJ currently has on Windows).

8 years agoUse _NSGetEnviron on OS X: fixes #2458
Max Bolingbroke [Wed, 6 Apr 2011 06:57:40 +0000 (07:57 +0100)] 
Use _NSGetEnviron on OS X: fixes #2458

8 years agoDocument invariants on mkText{Decoder,Encoder}
Max Bolingbroke [Mon, 4 Apr 2011 13:45:13 +0000 (14:45 +0100)] 
Document invariants on mkText{Decoder,Encoder}

8 years agoChange some uses of CString functions to CAString instead
Max Bolingbroke [Sun, 3 Apr 2011 21:36:39 +0000 (22:36 +0100)] 
Change some uses of CString functions to CAString instead

This prevents potential loops in future if we implement
FFI spec behaviour where the CString family use the locale encoding.

8 years agoFix handling of suffixes for GNU iconv
Max Bolingbroke [Sun, 3 Apr 2011 20:55:00 +0000 (21:55 +0100)] 
Fix handling of suffixes for GNU iconv

8 years agoChange debug prints in readTextDevice' to refer to right function
Max Bolingbroke [Sun, 3 Apr 2011 20:53:45 +0000 (21:53 +0100)] 
Change debug prints in readTextDevice' to refer to right function

8 years agoMerge branch 'master' of ssh://darcs.haskell.org/srv/darcs/packages/base
Max Bolingbroke [Sun, 3 Apr 2011 20:51:23 +0000 (21:51 +0100)] 
Merge branch 'master' of ssh://darcs.haskell.org/srv/darcs/packages/base

8 years agoAdd .gitignore
Max Bolingbroke [Sun, 3 Apr 2011 20:51:14 +0000 (21:51 +0100)] 
Add .gitignore

8 years agoLess strict inits and tails
Ian Lynagh [Sun, 3 Apr 2011 16:08:46 +0000 (17:08 +0100)] 
Less strict inits and tails

Converted from darcs patches from Bas van Dijk <v.dijk.bas@gmail.com>

Previously: tails _|_ = _|_
Now:        tails _|_ = _|_ : _|_

Previously: inits _|_ = _|_
Now:        inits _|_ = [] : _|_

8 years agoTweak alloca docs
Ian Lynagh [Sun, 3 Apr 2011 15:27:56 +0000 (16:27 +0100)] 
Tweak alloca docs

Based on a patch from Jason Dagit

8 years agoGeneralize the type of Foreign.Marshal.Utils.maybeNew; fixes trac #5044
Ian Lynagh [Sun, 3 Apr 2011 13:55:50 +0000 (14:55 +0100)] 
Generalize the type of Foreign.Marshal.Utils.maybeNew; fixes trac #5044

git conversion of:
Tue Mar  8 22:31:07 CET 2011  Bas van Dijk <v.dijk.bas@gmail.com>
  * Generalize the type of Foreign.Marshal.Utils.maybeNew
  This makes it consistent with maybeWith

8 years agoRewrite FPTOOLS_CHECK_HTYPE to be cross-compilation-friendly ghc-darcs-git-switchover
Ian Lynagh [Thu, 31 Mar 2011 01:18:08 +0000 (01:18 +0000)] 
Rewrite FPTOOLS_CHECK_HTYPE to be cross-compilation-friendly
Inspired by a patch from Mark Lentczner

8 years agoNo need to include the OpenGL / OpenAL headers in aclocal.m4
Ian Lynagh [Wed, 30 Mar 2011 20:27:56 +0000 (20:27 +0000)] 
No need to include the OpenGL / OpenAL headers in aclocal.m4

8 years agoExport the affinity API from Control.Concurrent: forkOn and friends.
Simon Marlow [Wed, 30 Mar 2011 10:05:04 +0000 (10:05 +0000)] 
Export the affinity API from Control.Concurrent: forkOn and friends.

forkOn             :: Int -> IO () -> IO ThreadId
forkOnWithUnmask   :: Int -> ((forall a . IO a -> IO a) -> IO ()) -> IO ThreadId
getNumCapabilities :: IO Int
threadCapability   :: ThreadId -> IO (Int, Bool)

Following discussion on the libraries list, I renamed forkOnIO to
forkOn.  In due course we might want to also rename forkIO to fork.

I left the Int argument as it is, it's quite useful to be able to
specify a number to be interpreted modulo the actual number of
processors.

I also used the term "capability" consistently.  It might not be the
best choice, but we have to pick something.

8 years agoDeprecate Control.Exception.blocked in favour of getMaskingState
Bas van Dijk [Thu, 3 Mar 2011 00:42:58 +0000 (00:42 +0000)] 
Deprecate Control.Exception.blocked in favour of getMaskingState