ghc-base.git
17 years agoDon't use Fd/FD in foreign decls
Ian Lynagh [Wed, 4 Apr 2007 15:58:22 +0000 (15:58 +0000)]
Don't use Fd/FD in foreign decls
Using CInt makes it much easier to verify that it is right, and we won't
get caught out by possible newtype switches between CInt/Int.

17 years agoHsByteArray doesn't exist
Ian Lynagh [Wed, 4 Apr 2007 15:57:32 +0000 (15:57 +0000)]
HsByteArray doesn't exist

17 years agoFix braino
Ian Lynagh [Wed, 4 Apr 2007 14:45:08 +0000 (14:45 +0000)]
Fix braino

17 years agoFix incorrect changes to C types in a foreign import for nhc98.
Malcolm.Wallace@cs.york.ac.uk [Wed, 4 Apr 2007 12:09:54 +0000 (12:09 +0000)]
Fix incorrect changes to C types in a foreign import for nhc98.
If we use type CTime, it needs to be imported.  Also, CTime is not an
instance of Integral, so use some other mechanism to convert it.

17 years agoFix C/Haskell type mismatches
Ian Lynagh [Tue, 3 Apr 2007 19:49:43 +0000 (19:49 +0000)]
Fix C/Haskell type mismatches

17 years agoadd new module Unsafe.Coerce to build system
Malcolm.Wallace@cs.york.ac.uk [Tue, 3 Apr 2007 13:13:33 +0000 (13:13 +0000)]
add new module Unsafe.Coerce to build system

17 years agoFix type mismatches between foreign imports and HsBase.h
Ian Lynagh [Tue, 3 Apr 2007 00:16:11 +0000 (00:16 +0000)]
Fix type mismatches between foreign imports and HsBase.h

Merge to stable, checking for interface changes.

18 years agoput 'unsafeCoerce' in a standard location
Malcolm.Wallace@cs.york.ac.uk [Mon, 13 Nov 2006 11:41:03 +0000 (11:41 +0000)]
put 'unsafeCoerce' in a standard location

17 years agofix for nhc98 build
Malcolm.Wallace@cs.york.ac.uk [Mon, 2 Apr 2007 14:17:12 +0000 (14:17 +0000)]
fix for nhc98 build

17 years agoFunction crossMapP for fixing desugaring of comprehensions
Manuel M T Chakravarty [Mon, 2 Apr 2007 08:29:06 +0000 (08:29 +0000)]
Function crossMapP for fixing desugaring of comprehensions

Merge into 6.6 branch.

17 years agoAdd min/max handling operations for IntSet/IntMap
jeanphilippe.bernardy@gmail.com [Thu, 15 Mar 2007 07:23:52 +0000 (07:23 +0000)]
Add min/max handling operations for IntSet/IntMap

17 years agoMonoid instance for Maybe and two wrappers: First and Last. trac proposal #1189
Jeffrey Yasskin [Fri, 9 Mar 2007 06:25:50 +0000 (06:25 +0000)]
Monoid instance for Maybe and two wrappers: First and Last. trac proposal #1189

17 years agoFix the type of wgencat
Ian Lynagh [Thu, 29 Mar 2007 16:42:23 +0000 (16:42 +0000)]
Fix the type of wgencat

17 years agofix strictness of foldr/build rule for take, see #1219
Simon Marlow [Tue, 27 Mar 2007 10:39:41 +0000 (10:39 +0000)]
fix strictness of foldr/build rule for take, see #1219

17 years agoremove Makefile.inc (only affects nhc98)
Malcolm.Wallace@cs.york.ac.uk [Tue, 20 Mar 2007 12:00:57 +0000 (12:00 +0000)]
remove Makefile.inc (only affects nhc98)

17 years agocopyBytes copies bytes, not elements; fixes trac #1203
Ian Lynagh [Mon, 12 Mar 2007 11:35:55 +0000 (11:35 +0000)]
copyBytes copies bytes, not elements; fixes trac #1203

17 years agoAdd ioeGetLocation, ioeSetLocation to System/IO/Error.hs; trac #1191
Ian Lynagh [Sun, 4 Mar 2007 13:03:15 +0000 (13:03 +0000)]
Add ioeGetLocation, ioeSetLocation to System/IO/Error.hs; trac #1191

17 years agofix race condition in prodServiceThread
Simon Marlow [Wed, 7 Mar 2007 13:43:30 +0000 (13:43 +0000)]
fix race condition in prodServiceThread
See #1187

17 years agoPrevent duplication of unsafePerformIO on a multiprocessor
Simon Marlow [Tue, 6 Mar 2007 14:54:24 +0000 (14:54 +0000)]
Prevent duplication of unsafePerformIO on a multiprocessor
Fixes #986.  The idea is to add a new operation

  noDuplicate :: IO ()

it is guaranteed that if two threads have executed noDuplicate, then
they are not duplicating any computation.

We now provide two new unsafe operations:

unsafeDupablePerformIO    :: IO a -> a
unsafeDupableInterleaveIO :: IO a -> IO a

which are equivalent to the old unsafePerformIO and unsafeInterleaveIO
respectively.  The new versions of these functions are defined as:

unsafePerformIO    m = unsafeDupablePerformIO (noDuplicate >> m)
unsafeInterleaveIO m = unsafeDupableInterleaveIO (noDuplicate >> m)

17 years agoexpand docs for forkOS
Simon Marlow [Mon, 5 Mar 2007 16:09:21 +0000 (16:09 +0000)]
expand docs for forkOS

17 years agodocument timeout limitations
Peter Simons [Wed, 28 Feb 2007 22:35:40 +0000 (22:35 +0000)]
document timeout limitations

17 years agoSo many people were involved in the writing of this module that
Peter Simons [Wed, 28 Feb 2007 22:34:15 +0000 (22:34 +0000)]
So many people were involved in the writing of this module that
it feels unfair to single anyone out as the lone copyright
holder.

17 years agoThis patch adds a timeout function to the base libraries. Trac #980 is
Peter Simons [Fri, 26 Jan 2007 22:26:15 +0000 (22:26 +0000)]
This patch adds a timeout function to the base libraries. Trac #980 is
concerned with this issue. The design guideline for this implementation
is that 'timeout N E' should behave exactly the same as E as long as E
doesn't time out. In our implementation, this means that E has the same
myThreadId it would have without the timeout wrapper. Any exception E
might throw cancels the timeout and propagates further up. It also
possible for E to receive exceptions thrown to it by another thread.

17 years agoPArr: fixed permutations
Manuel M T Chakravarty [Mon, 5 Mar 2007 05:58:07 +0000 (05:58 +0000)]
PArr: fixed permutations

17 years agoAdd Data.String, containing IsString(fromString); trac proposal #1126
Ian Lynagh [Tue, 30 Jan 2007 13:48:41 +0000 (13:48 +0000)]
Add Data.String, containing IsString(fromString); trac proposal #1126
This is used by the overloaded strings extension (-foverloaded-strings in GHC).

17 years agoGHC.PArr: add bounds checking
Manuel M T Chakravarty [Fri, 2 Mar 2007 05:32:24 +0000 (05:32 +0000)]
GHC.PArr: add bounds checking

17 years agoBump nhc98 stack size for System/Time.hsc
sven.panne@aedion.de [Thu, 1 Mar 2007 15:30:09 +0000 (15:30 +0000)]
Bump nhc98 stack size for System/Time.hsc

17 years agoFDs are CInts now, fixing non-GHC builds
sven.panne@aedion.de [Sun, 25 Feb 2007 10:56:20 +0000 (10:56 +0000)]
FDs are CInts now, fixing non-GHC builds

17 years agoFixed PArr.dropP
Manuel M T Chakravarty [Thu, 22 Feb 2007 03:24:05 +0000 (03:24 +0000)]
Fixed PArr.dropP
- Thanks to Audrey Tang for the bug report

17 years agoKeep the same FD in both halves of a duplex handle when dup'ing
Ian Lynagh [Tue, 20 Feb 2007 14:10:39 +0000 (14:10 +0000)]
Keep the same FD in both halves of a duplex handle when dup'ing
Otherwise we only close one of the FDs when closing the handle.
Fixes trac #1149.

17 years agoRemove more redundant FD conversions
Ian Lynagh [Tue, 20 Feb 2007 09:25:20 +0000 (09:25 +0000)]
Remove more redundant FD conversions

17 years agoFix FD changes on Windows
Ian Lynagh [Tue, 20 Feb 2007 09:15:16 +0000 (09:15 +0000)]
Fix FD changes on Windows

17 years agoConsistently use CInt rather than Int for FDs
Ian Lynagh [Mon, 19 Feb 2007 23:38:54 +0000 (23:38 +0000)]
Consistently use CInt rather than Int for FDs

17 years agoFix the types of minView/maxView (ticket #1134)
jeanphilippe.bernardy@gmail.com [Sat, 10 Feb 2007 06:51:15 +0000 (06:51 +0000)]
Fix the types of minView/maxView (ticket #1134)

17 years agofix for hashString, from Jan-Willem Maessen (see #1137)
Simon Marlow [Thu, 15 Feb 2007 09:43:04 +0000 (09:43 +0000)]
fix for hashString, from Jan-Willem Maessen (see #1137)

17 years agofix to getUSecOfDay(): arithmetic was overflowing
Simon Marlow [Wed, 14 Feb 2007 16:17:19 +0000 (16:17 +0000)]
fix to getUSecOfDay(): arithmetic was overflowing

17 years agoThe Windows counterpart to 'wrapround of thread delays'
Ian Lynagh [Fri, 9 Feb 2007 17:35:10 +0000 (17:35 +0000)]
The Windows counterpart to 'wrapround of thread delays'

17 years agowrapround of thread delays
Neil Davies [Mon, 29 Jan 2007 16:05:19 +0000 (16:05 +0000)]
wrapround of thread delays

  * made the wrapround of the underlying O/S occur before the wrapround
    of the delayed threads by making threads delay in microseconds since
    O/S epoch (1970 - Unix, 1601 - Windows) stored in Word64.
  * removed redundant calls reading O/S realtime clock
  * removed rounding to 1/50th of sec for timers
  * Only for Unix version of scheduler.

17 years agoWhitespace changes only
Ian Lynagh [Tue, 6 Feb 2007 23:27:22 +0000 (23:27 +0000)]
Whitespace changes only

17 years agoAdd some type sigs
Ian Lynagh [Tue, 6 Feb 2007 23:24:39 +0000 (23:24 +0000)]
Add some type sigs

17 years agoUse static inline rather than extern inline/inline
Ian Lynagh [Mon, 5 Feb 2007 20:36:28 +0000 (20:36 +0000)]
Use static inline rather than extern inline/inline
I understand this is more portable, and it also fixes warnings when
C things we are wrapping are themselves static inlines (which FD_ISSET
is on ppc OS X).

17 years agoadd derived instances for Dual monoid
Ross Paterson [Fri, 2 Feb 2007 19:08:47 +0000 (19:08 +0000)]
add derived instances for Dual monoid

17 years agoadd doc pointers to Foldable
Ross Paterson [Fri, 2 Feb 2007 11:09:31 +0000 (11:09 +0000)]
add doc pointers to Foldable

Could be applied to STABLE.

18 years agoEliminate some warnings
Ian Lynagh [Sat, 29 Jul 2006 22:08:54 +0000 (22:08 +0000)]
Eliminate some warnings
Eliminate warnings in the libraries caused by mixing pattern matching
with numeric literal matching.

17 years agoRemove IsString(fromString) from the Prelude
Ian Lynagh [Tue, 30 Jan 2007 12:41:36 +0000 (12:41 +0000)]
Remove IsString(fromString) from the Prelude

18 years agoAdd Kleisli composition
Don Stewart [Mon, 13 Nov 2006 01:54:42 +0000 (01:54 +0000)]
Add Kleisli composition

17 years agoIsString is GHC-only (so why is it in the Prelude?)
Ross Paterson [Tue, 23 Jan 2007 18:30:07 +0000 (18:30 +0000)]
IsString is GHC-only (so why is it in the Prelude?)

17 years agoApplicative and Monad instances for Tree
Ross Paterson [Mon, 15 Jan 2007 17:45:10 +0000 (17:45 +0000)]
Applicative and Monad instances for Tree

17 years agoAdd IsString class for overloaded string literals.
lennart@augustsson.net [Thu, 21 Dec 2006 21:05:32 +0000 (21:05 +0000)]
Add IsString class for overloaded string literals.

17 years agoAdded examples, more detailed documentation to Data.List Extracting sublists functions
Andriy Palamarchuk [Mon, 4 Dec 2006 16:47:10 +0000 (16:47 +0000)]
Added examples, more detailed documentation to Data.List Extracting sublists functions

17 years agofix threadDelay
Simon Marlow [Wed, 17 Jan 2007 09:17:02 +0000 (09:17 +0000)]
fix threadDelay
In "Add support for the IO manager thread" I accidentally spammed part
of "Make sure the threaded threadDelay sleeps at least as long as it
is asked", which is why the ThreadDelay001 test has been failing.

17 years agoupdate section on "blocking"
Simon Marlow [Tue, 16 Jan 2007 12:43:28 +0000 (12:43 +0000)]
update section on "blocking"

17 years agoFix crash with (minBound :: Int*) `div (-1) as result is maxBound + 1.
Ian Lynagh [Mon, 15 Jan 2007 14:20:05 +0000 (14:20 +0000)]
Fix crash with   (minBound :: Int*) `div (-1)   as result is maxBound + 1.

17 years agoversion of example using Tomasz Zielonka's technique
Ross Paterson [Fri, 5 Jan 2007 17:59:07 +0000 (17:59 +0000)]
version of example using Tomasz Zielonka's technique

18 years agoAdded Unknowns for higher kinds
Pepe Iborra [Wed, 8 Nov 2006 15:59:38 +0000 (15:59 +0000)]
Added Unknowns for higher kinds

18 years agoImproved the Show instance for Unknown
Pepe Iborra [Sun, 13 Aug 2006 11:18:16 +0000 (11:18 +0000)]
Improved the Show instance for Unknown

18 years agoShow instance for GHC.Base.Unknown
mnislaih@gmail.com [Tue, 1 Aug 2006 23:35:30 +0000 (23:35 +0000)]
Show instance for GHC.Base.Unknown

18 years agoIntroduce Unknowns for the closure viewer. Add breakpointCond which was missing
mnislaih@gmail.com [Tue, 25 Jul 2006 17:45:37 +0000 (17:45 +0000)]
Introduce Unknowns for the closure viewer. Add breakpointCond which was missing

17 years agoFix missing comma in Fractional documentation
Alec Berryman [Fri, 1 Dec 2006 17:32:37 +0000 (17:32 +0000)]
Fix missing comma in Fractional documentation

17 years agoMention that throwTo does not guarantee promptness of delivery
simonpj@microsoft [Mon, 11 Dec 2006 12:32:15 +0000 (12:32 +0000)]
Mention that throwTo does not guarantee promptness of delivery

17 years agoAdd note about synhronous delivery of throwTo
simonpj@microsoft [Mon, 11 Dec 2006 12:22:57 +0000 (12:22 +0000)]
Add note about synhronous delivery of throwTo

17 years agodocumentation for installHandler
Simon Marlow [Tue, 5 Dec 2006 15:49:27 +0000 (15:49 +0000)]
documentation for installHandler
merge to 6.6

17 years agodos2unix
Simon Marlow [Mon, 4 Dec 2006 09:54:39 +0000 (09:54 +0000)]
dos2unix

17 years agodon't try to compile this on Unix
Simon Marlow [Mon, 4 Dec 2006 09:54:27 +0000 (09:54 +0000)]
don't try to compile this on Unix

18 years agoTAG 6.6 release
Ian Lynagh [Wed, 11 Oct 2006 12:47:40 +0000 (12:47 +0000)]
TAG 6.6 release

18 years agoTAG Version 2.1
Ian Lynagh [Mon, 9 Oct 2006 11:40:14 +0000 (11:40 +0000)]
TAG Version 2.1

18 years agoBump version number
Ian Lynagh [Mon, 9 Oct 2006 11:40:09 +0000 (11:40 +0000)]
Bump version number

17 years agoAdd support for the IO manager thread on Windows
Simon Marlow [Fri, 1 Dec 2006 15:20:42 +0000 (15:20 +0000)]
Add support for the IO manager thread on Windows
Fixes #637.  The test program in that report now works for me with
-threaded, but it doesn't work without -threaded (I don't know if
that's new behaviour or not, though).

17 years agoderiving (Eq, Ord, Enum, Show, Read, Typeab) for ConsoleEvent
Simon Marlow [Fri, 1 Dec 2006 14:40:32 +0000 (14:40 +0000)]
deriving (Eq, Ord, Enum, Show, Read, Typeab) for ConsoleEvent

17 years agoMake sure the threaded threadDelay sleeps at least as long as it is asked to
Ian Lynagh [Tue, 28 Nov 2006 20:48:07 +0000 (20:48 +0000)]
Make sure the threaded threadDelay sleeps at least as long as it is asked to

17 years agoAdd comments about argument order to the definitions of gmapQ and constrFields
simonpj@microsoft [Fri, 24 Nov 2006 16:45:05 +0000 (16:45 +0000)]
Add comments about argument order to the definitions of gmapQ and constrFields

17 years agoHugs: add Control.Parallel.Strategies
Ross Paterson [Fri, 24 Nov 2006 16:10:39 +0000 (16:10 +0000)]
Hugs: add Control.Parallel.Strategies

17 years agoMove instance of Show Ptr to Ptr.hs (fewer orphans)
simonpj@microsoft.com [Fri, 24 Nov 2006 10:06:39 +0000 (10:06 +0000)]
Move instance of Show Ptr to Ptr.hs (fewer orphans)

17 years agoAdd type signatures
simonpj@microsoft.com [Fri, 24 Nov 2006 10:06:21 +0000 (10:06 +0000)]
Add type signatures

17 years agoAdd an example of the use of unfoldr, following doc feedback from dozer
Don Stewart [Fri, 24 Nov 2006 01:12:49 +0000 (01:12 +0000)]
Add an example of the use of unfoldr, following doc feedback from dozer

17 years agotrim imports
Ross Paterson [Thu, 23 Nov 2006 19:03:52 +0000 (19:03 +0000)]
trim imports

17 years agoData.Graph is now portable (enable for nhc98)
Malcolm.Wallace@cs.york.ac.uk [Thu, 23 Nov 2006 17:49:13 +0000 (17:49 +0000)]
Data.Graph is now portable (enable for nhc98)

18 years agoremove Data.FunctorM and Data.Queue
Ross Paterson [Sun, 12 Nov 2006 00:10:46 +0000 (00:10 +0000)]
remove Data.FunctorM and Data.Queue

These were deprecated in 6.6, and can thus be removed in 6.8.

17 years agomake Data.Graph portable (no change to the interface)
Ross Paterson [Wed, 22 Nov 2006 01:00:40 +0000 (01:00 +0000)]
make Data.Graph portable (no change to the interface)

The algorithm now uses STArrays on GHC and IntSets elsewhere.
(Hugs has STArrays, but avoiding them saves a -98, and boxed arrays
aren't fast under Hugs anyway.)

17 years agoOne less unsafeCoerce# in the tree
Don Stewart [Mon, 20 Nov 2006 12:02:42 +0000 (12:02 +0000)]
One less unsafeCoerce# in the tree

17 years agotypo in comment
Ross Paterson [Mon, 20 Nov 2006 11:51:06 +0000 (11:51 +0000)]
typo in comment

17 years agofix shift docs to match ffi spec
Ross Paterson [Fri, 17 Nov 2006 00:31:44 +0000 (00:31 +0000)]
fix shift docs to match ffi spec

17 years ago(nhc98) use new primitive implementations of h{Put,Get}Buf.
Malcolm.Wallace@cs.york.ac.uk [Thu, 16 Nov 2006 17:31:04 +0000 (17:31 +0000)]
(nhc98) use new primitive implementations of h{Put,Get}Buf.

18 years agoThe wrong 'cycle' was exported from Data.ByteString.Lazy.Char8, spotted by sjanssen
Don Stewart [Fri, 10 Nov 2006 02:13:11 +0000 (02:13 +0000)]
The wrong 'cycle' was exported from Data.ByteString.Lazy.Char8, spotted by sjanssen

18 years agoLPS chunk sizes should be 16 bytes, not 17.
Don Stewart [Fri, 10 Nov 2006 02:12:54 +0000 (02:12 +0000)]
LPS chunk sizes should be 16 bytes, not 17.

18 years agoUpdate comments on Prelude organisation in GHC/Base.lhs
Ian Lynagh [Wed, 15 Nov 2006 00:19:26 +0000 (00:19 +0000)]
Update comments on Prelude organisation in GHC/Base.lhs

18 years agoControl.Parallel.Strategies clean-up: Added export list to avoid exporting seq, fixed...
bringert@cs.chalmers.se [Mon, 13 Nov 2006 22:42:02 +0000 (22:42 +0000)]
Control.Parallel.Strategies clean-up: Added export list to avoid exporting seq, fixed import list strangeness that haddock choked on, and moved the deprecated functions to a separate section.

18 years agoControl.Parallel.Strategies: added NFData instances for Data.Int.*, Data.Word.*,...
bringert@cs.chalmers.se [Mon, 13 Nov 2006 22:18:43 +0000 (22:18 +0000)]
Control.Parallel.Strategies: added NFData instances for Data.Int.*, Data.Word.*, Maybe, Either, Map, Set, Tree, IntMap, IntSet.

18 years agoControl.Parallel.Strategies: deprecate sPar, sSeq, Assoc, fstPairFstList, force and...
bringert@cs.chalmers.se [Mon, 13 Nov 2006 21:52:19 +0000 (21:52 +0000)]
Control.Parallel.Strategies: deprecate sPar, sSeq, Assoc, fstPairFstList, force and sforce.
Code comments indicated that sPar and sSeq have been superceded by sparking and demanding, and that Assoc, fstPairFstList, force and sforce are examples and hacks needed by the Lolita system.

18 years agoadd Control.Monad.Instances to nhc98 build
Malcolm.Wallace@cs.york.ac.uk [Mon, 13 Nov 2006 11:32:21 +0000 (11:32 +0000)]
add Control.Monad.Instances to nhc98 build

18 years agoControl.Parallel.Strategies: clarified documentation of parListChunk.
bringert@cs.chalmers.se [Sun, 12 Nov 2006 23:29:04 +0000 (23:29 +0000)]
Control.Parallel.Strategies: clarified documentation of parListChunk.

18 years agoAdded and cleaned up Haddock comments in Control.Parallel.Strategies.
bringert@cs.chalmers.se [Sun, 12 Nov 2006 22:04:45 +0000 (22:04 +0000)]
Added and cleaned up Haddock comments in Control.Parallel.Strategies.
Many of the definitions in Control.Parallel.Strategies had missing or unclear Haddock comments. I converted most of the existing plain code comments to haddock comments, added some missing documentation and cleaned up the existing Haddock mark-up.

18 years agoFix broken pragmas; spotted by Bulat Ziganshin
Ian Lynagh [Sat, 11 Nov 2006 20:59:16 +0000 (20:59 +0000)]
Fix broken pragmas; spotted by Bulat Ziganshin

18 years agoadd doc link to bound threads section
Ross Paterson [Fri, 29 Sep 2006 10:32:52 +0000 (10:32 +0000)]
add doc link to bound threads section

18 years agohide Data.Array.IO.Internals
Ross Paterson [Sat, 11 Nov 2006 11:32:48 +0000 (11:32 +0000)]
hide Data.Array.IO.Internals

It's hidden from haddock, and everything it exports is re-exported by
Data.Array.IO.

18 years agoadd Data.Function
Malcolm.Wallace@cs.york.ac.uk [Fri, 10 Nov 2006 14:27:10 +0000 (14:27 +0000)]
add Data.Function

18 years agoadd Data.Function
Ross Paterson [Fri, 10 Nov 2006 14:13:54 +0000 (14:13 +0000)]
add Data.Function

18 years agowhitespace only
Ross Paterson [Fri, 10 Nov 2006 14:13:26 +0000 (14:13 +0000)]
whitespace only

18 years agomove fix to Data.Function
Ross Paterson [Fri, 10 Nov 2006 14:11:20 +0000 (14:11 +0000)]
move fix to Data.Function

18 years agoimport Prelude
Ross Paterson [Fri, 10 Nov 2006 14:04:45 +0000 (14:04 +0000)]
import Prelude