ghc.git
13 years agoFixed import list syntax
Sven Panne [Sun, 7 May 2006 15:50:08 +0000 (15:50 +0000)] 
Fixed import list syntax

13 years agoFaster filterF, filterNotByte
dons@cse.unsw.edu.au [Sun, 7 May 2006 04:23:01 +0000 (04:23 +0000)] 
Faster filterF, filterNotByte

13 years agoMuch faster find, findIndex. Hint from sjanssen
dons@cse.unsw.edu.au [Sun, 7 May 2006 03:30:48 +0000 (03:30 +0000)] 
Much faster find, findIndex. Hint from sjanssen

13 years agoMerge "unrecognized long opt" fix from 6.4.2
Sven Panne [Sat, 6 May 2006 11:05:19 +0000 (11:05 +0000)] 
Merge "unrecognized long opt" fix from 6.4.2

13 years agoSat May 6 13:01:34 EST 2006 Don Stewart <dons@cse.unsw.edu.au>
dons@cse.unsw.edu.au [Sat, 6 May 2006 06:10:29 +0000 (06:10 +0000)] 
Sat May  6 13:01:34 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
  * Do loopU realloc on the Haskell heap. And add a really tough stress test

Sat May  6 12:28:58 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
  * Use simple, 3x faster concat. Plus QC properties. Suggested by sjanssen and dcoutts

Sat May  6 15:59:31 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
  * dcoutt's packByte bug squashed

  With inlinePerformIO, ghc head was compiling:

   packByte 255 `compare` packByte 127

  into roughly

   case mallocByteString 2 of
       ForeignPtr f internals ->
            case writeWord8OffAddr# f 0 255 of _ ->
            case writeWord8OffAddr# f 0 127 of _ ->
            case eqAddr# f f of
                   False -> case compare (GHC.Prim.plusAddr# f 0)
                                         (GHC.Prim.plusAddr# f 0)

  which is rather stunning. unsafePerformIO seems to prevent whatever
  magic inlining was leading to this. Only affected the head.

13 years agoAdd array fusion versions of map, filter and foldl
dons@cse.unsw.edu.au [Fri, 5 May 2006 06:08:58 +0000 (06:08 +0000)] 
Add array fusion versions of map, filter and foldl

This patch adds fusable map, filter and foldl, using the array fusion
code for unlifted, flat arrays, from the Data Parallel Haskell branch,
after kind help from Roman Leshchinskiy,

Pipelines of maps, filters and folds should now need to walk the
bytestring once only, and intermediate bytestrings won't be constructed.

13 years agofix for non-GHC
Ross Paterson [Thu, 4 May 2006 09:30:44 +0000 (09:30 +0000)] 
fix for non-GHC

13 years agouse bracket in appendFile (like writeFile)
Ross Paterson [Thu, 4 May 2006 09:15:28 +0000 (09:15 +0000)] 
use bracket in appendFile (like writeFile)

13 years agowriteFile: close the file on error
Simon Marlow [Thu, 4 May 2006 08:45:05 +0000 (08:45 +0000)] 
writeFile: close the file on error
Suggested by Ross Paterson, via Neil Mitchell

13 years agoSync with FPS head
dons@cse.unsw.edu.au [Wed, 3 May 2006 10:52:59 +0000 (10:52 +0000)] 
Sync with FPS head

This patch brings Data.ByteString into sync with the FPS head.
The most significant of which is the new Haskell counting sort.

Changes:

Sun Apr 30 18:16:29 EST 2006  sjanssen@cse.unl.edu
  * Fix foldr1 in Data.ByteString and Data.ByteString.Char8

Mon May  1 11:51:16 EST 2006  Don Stewart <dons@cse.unsw.edu.au>
  * Add group and groupBy. Suggested by conversation between sjanssen and petekaz on #haskell

Mon May  1 16:42:04 EST 2006  sjanssen@cse.unl.edu
  * Fix groupBy to match Data.List.groupBy.

Wed May  3 15:01:07 EST 2006  sjanssen@cse.unl.edu
  * Migrate to counting sort.

  Data.ByteString.sort used C's qsort(), which is O(n log n).  The new algorithm
  is O(n), and is faster for strings larger than approximately thirty bytes.  We
  also reduce our dependency on cbits!

13 years agoimprove performance of Integer->String conversion
Simon Marlow [Wed, 3 May 2006 11:33:06 +0000 (11:33 +0000)] 
improve performance of Integer->String conversion
See
 http://www.haskell.org//pipermail/libraries/2006-April/005227.html

Submitted by: bertram.felgenhauer@googlemail.com

13 years agoinline withMVar, modifyMVar, modifyMVar_
Simon Marlow [Wed, 3 May 2006 11:11:52 +0000 (11:11 +0000)] 
inline withMVar, modifyMVar, modifyMVar_

13 years agoFix string truncating in hGetLine -- it was a pasto from Simon's code
Simon Marlow [Wed, 3 May 2006 10:35:04 +0000 (10:35 +0000)] 
Fix string truncating in hGetLine -- it was a pasto from Simon's code
(from Don Stewart)

13 years agoMerge in Data.ByteString head. Fixes ByteString+cbits in hugs
Don Stewart [Sat, 29 Apr 2006 04:07:33 +0000 (04:07 +0000)] 
Merge in Data.ByteString head. Fixes ByteString+cbits in hugs

13 years agoImport Data.ByteString from fps 0.5.
Don Stewart [Fri, 28 Apr 2006 13:07:18 +0000 (13:07 +0000)] 
Import Data.ByteString from fps 0.5.
Fast, packed byte vectors, providing a better PackedString.

13 years agofix previous patch
Ross Paterson [Mon, 1 May 2006 15:48:47 +0000 (15:48 +0000)] 
fix previous patch

13 years agofixes for non-GHC
Ross Paterson [Mon, 1 May 2006 14:43:22 +0000 (14:43 +0000)] 
fixes for non-GHC

13 years agofix imports for mingw32 && !GHC
Ross Paterson [Thu, 27 Apr 2006 16:32:48 +0000 (16:32 +0000)] 
fix imports for mingw32 && !GHC

13 years agoRequireOrder: do not collect unrecognised options after a non-opt
Simon Marlow [Wed, 26 Apr 2006 12:11:10 +0000 (12:11 +0000)] 
RequireOrder: do not collect unrecognised options after a non-opt
The documentation for RequireOrder says "no option processing after
first non-option", so it doesn't seem right that we should process the
rest of the arguments to collect the unrecognised ones.  Presumably
the client wants to know about the unrecognised options up to the
first non-option, and will be using a different option parser for the
rest of the command line.

eg. before:

Prelude System.Console.GetOpt> getOpt' RequireOrder [] ["bar","--foo"]
([],["bar","--foo"],["--foo"],[])

after:

Prelude System.Console.GetOpt> getOpt' RequireOrder [] ["bar","--foo"]
([],["bar","--foo"],[],[])

13 years agofix for Haddock 0.7
Ashley Yakeley [Wed, 26 Apr 2006 07:25:21 +0000 (07:25 +0000)] 
fix for Haddock 0.7

13 years agoadd Data.Fixed module
Ashley Yakeley [Tue, 25 Apr 2006 07:18:53 +0000 (07:18 +0000)] 
add Data.Fixed module

13 years agoadd instances
Ross Paterson [Mon, 24 Apr 2006 10:21:46 +0000 (10:21 +0000)] 
add instances

13 years agoadd superclasses to Applicative and Traversable
Ross Paterson [Tue, 11 Apr 2006 14:47:34 +0000 (14:47 +0000)] 
add superclasses to Applicative and Traversable

Functor is now a superclass of Applicative, and Functor and Foldable
are now superclasses of Traversable.  The new hierarchy makes clear the
inclusions between the classes, but means more work in defining instances.
Default definitions are provided to help.

13 years agoadd Functor and Monad instances for Prelude types
Ross Paterson [Mon, 10 Apr 2006 11:14:43 +0000 (11:14 +0000)] 
add Functor and Monad instances for Prelude types

13 years agoGHC.Base.breakpoint
Lemmih [Fri, 7 Apr 2006 12:58:27 +0000 (12:58 +0000)] 
GHC.Base.breakpoint

13 years agoTrack the GHC source tree reorganisation
Simon Marlow [Fri, 7 Apr 2006 04:16:31 +0000 (04:16 +0000)] 
Track the GHC source tree reorganisation

13 years agoin the show instance for Exception, print the type of dynamic exceptions
Simon Marlow [Thu, 6 Apr 2006 11:24:44 +0000 (11:24 +0000)] 
in the show instance for Exception, print the type of dynamic exceptions
Unfortunately this requires some recursve module hackery to get at
the show instance for Typeable.

13 years agoimplement ForeignEnvPtr, newForeignPtrEnv, addForeignPtrEnv for GHC
Simon Marlow [Wed, 5 Apr 2006 15:54:48 +0000 (15:54 +0000)] 
implement ForeignEnvPtr, newForeignPtrEnv, addForeignPtrEnv for GHC

13 years agoadd forkOnIO :: Int -> IO () -> IO ThreadId
Simon Marlow [Mon, 27 Mar 2006 13:50:18 +0000 (13:50 +0000)] 
add  forkOnIO :: Int -> IO () -> IO ThreadId

13 years agoRework previous: not a gcc bug after all
Simon Marlow [Thu, 23 Mar 2006 16:12:29 +0000 (16:12 +0000)] 
Rework previous: not a gcc bug after all
It turns out that we were relying on behaviour that is undefined in C,
and undefined behaviour in C means "the compiler can do whatever the
hell it likes with your entire program".  So avoid that.

13 years agowork around a gcc 4.1.0 codegen bug in -O2 by forcing -O1 for GHC.Show
Simon Marlow [Thu, 23 Mar 2006 13:45:14 +0000 (13:45 +0000)] 
work around a gcc 4.1.0 codegen bug in -O2 by forcing -O1 for GHC.Show
See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26824

13 years agocommit mysteriously missing parts of "runIOFastExit" patch
Simon Marlow [Tue, 21 Mar 2006 10:15:35 +0000 (10:15 +0000)] 
commit mysteriously missing parts of "runIOFastExit" patch

13 years agoadd runIOFastExit :: IO a -> IO a
Simon Marlow [Mon, 20 Mar 2006 12:43:33 +0000 (12:43 +0000)] 
add runIOFastExit :: IO a -> IO a
Similar to runIO, but calls stg_exit() directly to exit, rather than
shutdownHaskellAndExit().  Needed for running GHCi in the test suite.

13 years agoFix a broken invariant
Simon Marlow [Thu, 16 Mar 2006 13:41:51 +0000 (13:41 +0000)] 
Fix a broken invariant
Patch from #694,  for the problem "empty is an identity for <> and $$" is
currently broken by eg. isEmpty (empty<>empty)"

13 years agoAdd unsafeSTToIO :: ST s a -> IO a
Simon Marlow [Wed, 15 Mar 2006 16:02:32 +0000 (16:02 +0000)] 
Add unsafeSTToIO :: ST s a -> IO a
Implementation for Hugs is missing, but should be easy.  We need this
for the forthcoming nested data parallelism implementation.

13 years agoAdded 'alter'
jeanphilippe.bernardy@gmail.com [Wed, 15 Mar 2006 14:35:39 +0000 (14:35 +0000)] 
Added 'alter'
Added 'alter :: (Maybe a -> Maybe a) -> k -> Map k a -> Map k a' to IntMap and Map
This addresses ticket #665

13 years agodeprecate FunctorM in favour of Foldable and Traversable
Ross Paterson [Wed, 15 Mar 2006 09:29:42 +0000 (09:29 +0000)] 
deprecate FunctorM in favour of Foldable and Traversable
as discussed on the libraries list.

13 years agoSimplify Eq, Ord, and Show instances for UArray
Simon Marlow [Mon, 13 Mar 2006 14:27:01 +0000 (14:27 +0000)] 
Simplify Eq, Ord, and Show instances for UArray
The Eq, Ord, and Show instances of UArray were written out longhand
with one instance per element type.  It is possible to condense these
into a single instance for each class, at the expense of using more
extensions (non-std context on instance declaration).

Suggestion by: Frederik Eaton <frederik@ofb.net>

13 years agoOops typo in intSet notMember
jeanphilippe.bernardy@gmail.com [Sat, 11 Mar 2006 22:47:13 +0000 (22:47 +0000)] 
Oops typo in intSet notMember

13 years agoIntMap lookup now returns monad instead of Maybe.
jeanphilippe.bernardy@gmail.com [Sat, 11 Mar 2006 22:45:02 +0000 (22:45 +0000)] 
IntMap lookup now returns monad instead of Maybe.

13 years agoAdded notMember to Data.IntSet and Data.IntMap
jeanphilippe.bernardy@gmail.com [Sat, 11 Mar 2006 08:52:21 +0000 (08:52 +0000)] 
Added notMember to Data.IntSet and Data.IntMap

13 years agoadd Data.Set.notMember and Data.Map.notMember
John Meacham [Thu, 9 Mar 2006 19:18:06 +0000 (19:18 +0000)] 
add Data.Set.notMember and Data.Map.notMember

13 years agoaddToClockTime: handle picoseconds properly
Simon Marlow [Fri, 10 Mar 2006 11:45:32 +0000 (11:45 +0000)] 
addToClockTime: handle picoseconds properly
fixes #588

13 years agomake head/build rule apply to all types, not just Bool.
John Meacham [Fri, 3 Mar 2006 04:57:53 +0000 (04:57 +0000)] 
make head/build rule apply to all types, not just Bool.

13 years agoAvoid overflow when normalising clock times
Ian Lynagh [Fri, 10 Feb 2006 14:46:38 +0000 (14:46 +0000)] 
Avoid overflow when normalising clock times

13 years agoYears have 365 days, not 30*365
Ian Lynagh [Fri, 10 Feb 2006 14:28:53 +0000 (14:28 +0000)] 
Years have 365 days, not 30*365

13 years agodeclare blkcmp() static
Simon Marlow [Thu, 23 Feb 2006 13:43:17 +0000 (13:43 +0000)] 
declare blkcmp() static

13 years agotypo in comment in Foldable class
Ross Paterson [Thu, 9 Feb 2006 00:49:01 +0000 (00:49 +0000)] 
typo in comment in Foldable class

13 years agosimplify fmap
Ross Paterson [Mon, 6 Feb 2006 09:50:48 +0000 (09:50 +0000)] 
simplify fmap

13 years agoupdate ref in comment
Ross Paterson [Mon, 6 Feb 2006 09:51:39 +0000 (09:51 +0000)] 
update ref in comment

13 years agoGive -foverlapping-instances to Data.Typeable
simonpj@microsoft [Mon, 6 Feb 2006 13:34:39 +0000 (13:34 +0000)] 
Give -foverlapping-instances to Data.Typeable

For some time, GHC has made -fallow-overlapping-instances "sticky":
any instance in a module compiled with -fallow-overlapping-instances
can overlap when imported, regardless of whether the importing module
allows overlap.  (If there is an overlap, both instances must come from
modules thus compiled.)

Instances in Data.Typeable might well want to be overlapped, so this
commit adds the flag to Data.Typeable (with an explanatory comment)

13 years agoAdd -fno-bang-patterns to modules using both bang and glasgow-exts
simonpj@microsoft.com [Fri, 3 Feb 2006 17:57:59 +0000 (17:57 +0000)] 
Add -fno-bang-patterns to modules using both bang and glasgow-exts

13 years agoWhen splitting a bucket, keep the contents in the same order
Simon Marlow [Wed, 1 Feb 2006 13:04:27 +0000 (13:04 +0000)] 
When splitting a bucket, keep the contents in the same order
To retain the property that multiple inserts shadow each other
(see ticket #661, test hash001)

13 years agoadd foldr/build optimisation for take and replicate
Simon Marlow [Thu, 26 Jan 2006 16:46:03 +0000 (16:46 +0000)] 
add foldr/build optimisation for take and replicate
This allows take to be deforested, and improves performance of
replicate and replicateM/replicateM_.  We have a separate problem that
means expressions involving [n..m] aren't being completely optimised
because eftIntFB isn't being inlined but otherwise the results look
good.

Sadly this has invalidated a number of the nofib benchmarks which were
erroneously using take to duplicate work in a misguided attempt to
lengthen their runtimes (ToDo).

13 years agoGenerate PrimopWrappers.hs with Haddock docs
Simon Marlow [Tue, 24 Jan 2006 13:11:21 +0000 (13:11 +0000)] 
Generate PrimopWrappers.hs with Haddock docs
Patch originally from Dinko Tenev <dinko.tenev@gmail.com>, modified
to add log message by me.

13 years ago[project @ 2006-01-19 14:47:15 by ross]
ross [Thu, 19 Jan 2006 14:47:15 +0000 (14:47 +0000)] 
[project @ 2006-01-19 14:47:15 by ross]
backport warning avoidance from Haddock

13 years ago[project @ 2006-01-18 11:45:47 by malcolm]
malcolm [Wed, 18 Jan 2006 11:45:47 +0000 (11:45 +0000)] 
[project @ 2006-01-18 11:45:47 by malcolm]
Fix import of Ix for nhc98.

13 years ago[project @ 2006-01-17 09:38:38 by ross]
ross [Tue, 17 Jan 2006 09:38:38 +0000 (09:38 +0000)] 
[project @ 2006-01-17 09:38:38 by ross]
add Ix instance for GeneralCategory.

13 years ago[project @ 2006-01-11 11:29:49 by simonmar]
simonmar [Wed, 11 Jan 2006 11:29:49 +0000 (11:29 +0000)] 
[project @ 2006-01-11 11:29:49 by simonmar]
add some more warnings about unsafeThaw

13 years ago[project @ 2006-01-10 10:23:16 by simonmar]
simonmar [Tue, 10 Jan 2006 10:23:16 +0000 (10:23 +0000)] 
[project @ 2006-01-10 10:23:16 by simonmar]
improve documentation for takeMVar/putMVar

13 years ago[project @ 2006-01-06 15:52:36 by simonpj]
simonpj [Fri, 6 Jan 2006 15:52:36 +0000 (15:52 +0000)] 
[project @ 2006-01-06 15:52:36 by simonpj]
Use a type sig rather than a pattern signature, to avoid
depending on GHC's precise impl of scoped type variables.
(Which I'm about to change.)

13 years ago[project @ 2006-01-06 15:51:23 by simonpj]
simonpj [Fri, 6 Jan 2006 15:51:23 +0000 (15:51 +0000)] 
[project @ 2006-01-06 15:51:23 by simonpj]
Eta-expand some higher-rank functions.  GHC is about to
move to *invariant* rather than *contra-variant* in function
arguments, so far as type subsumption is concerned. These
eta-expansions are simple, and allow type inference to
go through with invariance.

13 years ago[project @ 2006-01-06 15:46:09 by simonpj]
simonpj [Fri, 6 Jan 2006 15:46:09 +0000 (15:46 +0000)] 
[project @ 2006-01-06 15:46:09 by simonpj]
Fix one-char typo in scanl1P

13 years ago[project @ 2006-01-02 19:38:01 by jpbernardy]
jpbernardy [Mon, 2 Jan 2006 19:38:01 +0000 (19:38 +0000)] 
[project @ 2006-01-02 19:38:01 by jpbernardy]
* Left-bias restored
* Minor documentation improvements

13 years ago[project @ 2005-12-30 00:18:59 by ross]
ross [Fri, 30 Dec 2005 00:18:59 +0000 (00:18 +0000)] 
[project @ 2005-12-30 00:18:59 by ross]
deriving Data

13 years ago[project @ 2005-12-15 11:17:31 by simonmar]
simonmar [Thu, 15 Dec 2005 11:17:31 +0000 (11:17 +0000)] 
[project @ 2005-12-15 11:17:31 by simonmar]
Add dataCast1/dataCast2 methods to Data class, as per ticket #633.

13 years ago[project @ 2005-12-13 15:57:49 by simonmar]
simonmar [Tue, 13 Dec 2005 15:57:49 +0000 (15:57 +0000)] 
[project @ 2005-12-13 15:57:49 by simonmar]
Raise the (new) exception NestedAtomically when atomically is nested
(using unsafePerformIO).  This is a small improvement over crashing.

13 years ago[project @ 2005-12-13 13:28:53 by simonmar]
simonmar [Tue, 13 Dec 2005 13:28:53 +0000 (13:28 +0000)] 
[project @ 2005-12-13 13:28:53 by simonmar]
Only Streams can be DuplexHandles, not RawDevices.

13 years ago[project @ 2005-12-05 11:42:47 by simonmar]
simonmar [Mon, 5 Dec 2005 11:42:47 +0000 (11:42 +0000)] 
[project @ 2005-12-05 11:42:47 by simonmar]
Add IO versions of the STM primitives that allocate new transactional variables:

  newTVarIO :: a -> IO (TVar a)
  newTChanIO :: IO (TChan a)
  newTMVarIO :: a -> IO (TMVar a)

These can be used inside unsafePerformIO, unlike the STM versions.

13 years ago[project @ 2005-12-03 17:32:01 by jpbernardy]
jpbernardy [Sat, 3 Dec 2005 17:32:01 +0000 (17:32 +0000)] 
[project @ 2005-12-03 17:32:01 by jpbernardy]
Removed spurious constraint for Monoid (IntMap a) instance

13 years ago[project @ 2005-12-02 14:29:28 by simonmar]
simonmar [Fri, 2 Dec 2005 14:29:28 +0000 (14:29 +0000)] 
[project @ 2005-12-02 14:29:28 by simonmar]
avoid recursive module trap with Haddock

13 years ago[project @ 2005-12-02 12:26:22 by simonmar]
simonmar [Fri, 2 Dec 2005 12:26:22 +0000 (12:26 +0000)] 
[project @ 2005-12-02 12:26:22 by simonmar]
Apply rev 1.24 from FreeBSD's copy of this file.  Commit message from
FreeBSD:

   The algorithm that computes the tables used in the BM search
   algorithm sometimes access an array beyond it's length. This only
   happens in the last iteration of a loop, and the value fetched is
   not used then, so the bug is a relatively innocent one. Fix this by
   not fetching any value on the last iteration of said loop.

   Submitted by: MKI <mki@mozone.net>

This is the cause of bug #1194393 (crash in darcs on Windows).

13 years ago[project @ 2005-12-01 12:37:23 by simonmar]
simonmar [Thu, 1 Dec 2005 12:37:23 +0000 (12:37 +0000)] 
[project @ 2005-12-01 12:37:23 by simonmar]
oops, forgot to remove forkIO from here

13 years ago[project @ 2005-12-01 12:32:24 by simonmar]
simonmar [Thu, 1 Dec 2005 12:32:24 +0000 (12:32 +0000)] 
[project @ 2005-12-01 12:32:24 by simonmar]
export childHandler

13 years ago[project @ 2005-11-30 16:56:24 by simonmar]
simonmar [Wed, 30 Nov 2005 16:56:24 +0000 (16:56 +0000)] 
[project @ 2005-11-30 16:56:24 by simonmar]
- move forkIO into GHC.Conc, so that the I/O manager can use proper forkIO
  with an exception handler.  This required TopHandler.lhs-boot.  It's the
  right thing, though, since the forkIO implementation is GHC-specific.

- check for out-of-range file descriptors in the I/O manager, rather than
  just exploding.  The I/O manager will exit ungracefully, but at least
  there will be an error message.

13 years ago[project @ 2005-11-30 12:24:18 by simonmar]
simonmar [Wed, 30 Nov 2005 12:24:18 +0000 (12:24 +0000)] 
[project @ 2005-11-30 12:24:18 by simonmar]
Add

  registerDelay :: Int -> IO (TVar Bool)

for implementing delays and timeouts in STM.  The delay is implemented
in the same way as threadDelay.  Currently doesn't work on Windows or
without -threaded (I do intend to make it work on Windows, though).

13 years ago[project @ 2005-11-29 14:31:59 by ross]
ross [Tue, 29 Nov 2005 14:31:59 +0000 (14:31 +0000)] 
[project @ 2005-11-29 14:31:59 by ross]
As foreshadowed on the libraries list, introduce new classes:

Applicative (formerly known as Idiom): generalizes (but does not replace)
both Monad and Monoid.

Traversable: containers that can be traversed, executing actions and
re-assembling the results.  This class generalizes and replaces FunctorM,
because it requires Applicative instead of Monad.

Foldable: containers that can be folded over a Monoid.  Traversable
supplies a default definition, but some structures, e.g. Set, are Foldable
but not Traversable.

13 years ago[project @ 2005-11-17 15:54:17 by ross]
ross [Thu, 17 Nov 2005 15:54:17 +0000 (15:54 +0000)] 
[project @ 2005-11-17 15:54:17 by ross]
add a couple of Boolean instances

13 years ago[project @ 2005-11-17 11:28:43 by simonmar]
simonmar [Thu, 17 Nov 2005 11:28:44 +0000 (11:28 +0000)] 
[project @ 2005-11-17 11:28:43 by simonmar]
ProcessHandle is now an MVar, in which we cache the ExitCode of the
process when we know it.

Additionally, waitForProcess and getProcessExitCode now close the
handle eagerly on Windows, this avoids a problem with hsc2hs which
wants to remove the executable it just ran, and it can't if the handle
is still open.

13 years ago[project @ 2005-11-13 16:52:14 by jpbernardy]
jpbernardy [Sun, 13 Nov 2005 16:52:14 +0000 (16:52 +0000)] 
[project @ 2005-11-13 16:52:14 by jpbernardy]
Correct handling of negative numbers in split and splitMember in IntMap and IntSet.
Better documentation for insert and insertWith in Maps.

13 years ago[project @ 2005-11-11 14:41:01 by simonmar]
simonmar [Fri, 11 Nov 2005 14:41:01 +0000 (14:41 +0000)] 
[project @ 2005-11-11 14:41:01 by simonmar]
waitForProcess: if the process died with a signal, just return the
exit status rather than EINTR.

This means a segfault shows up as (ExitFailure 139) rather than
an exception complaining about system call interruption.  If the
client wants a more unix-ish interpretation, they probably should be
using System.Posix.Process anyway.

13 years ago[project @ 2005-11-11 12:01:58 by simonmar]
simonmar [Fri, 11 Nov 2005 12:01:58 +0000 (12:01 +0000)] 
[project @ 2005-11-11 12:01:58 by simonmar]
On Windows, attach a finalizer to the ProcessHandle so that we can
call CloseHandle() when the handle is no longer in use.  Previously we
were calling CloseHandle() in waitForProcess and terminateProcess,
which prevented making multiple calls to these functions on the same
handle.

13 years ago[project @ 2005-11-11 10:37:35 by simonmar]
simonmar [Fri, 11 Nov 2005 10:37:35 +0000 (10:37 +0000)] 
[project @ 2005-11-11 10:37:35 by simonmar]
Fix bugs in new signal handling machinery

13 years ago[project @ 2005-11-10 12:58:32 by simonmar]
simonmar [Thu, 10 Nov 2005 12:58:32 +0000 (12:58 +0000)] 
[project @ 2005-11-10 12:58:32 by simonmar]
Some docs for System.Posix, from Bj?rn Bringert

13 years ago[project @ 2005-11-07 16:39:04 by simonmar]
simonmar [Mon, 7 Nov 2005 16:39:04 +0000 (16:39 +0000)] 
[project @ 2005-11-07 16:39:04 by simonmar]
add GHC notes to mallocForeignPtr

13 years ago[project @ 2005-10-27 01:39:40 by sof]
sof [Thu, 27 Oct 2005 01:39:40 +0000 (01:39 +0000)] 
[project @ 2005-10-27 01:39:40 by sof]
[mingw/msys only]
Undo long-standing workaround for buggy GNU ld's on mingw/msys; i.e.,
the linker wasn't correctly generating relocatable object files when
the number of relocs exceeded 2^16. Worked around the issue by
hackily splitting up the GHCi object file for the larger packages
('base', 'ObjectIO' and 'win32') into a handful of object files,
each with a manageable number of relocs. Tiresome and error-prone
(but the hack has served us well!)

This commit imposes a restriction on the 'ld' you use to compile
up GHC with; it now has to be ld-2.15.x or later (something GHC
binary dists have shipped with since 6.2.2)

13 years ago[project @ 2005-10-26 22:52:58 by ross]
ross [Wed, 26 Oct 2005 22:52:58 +0000 (22:52 +0000)] 
[project @ 2005-10-26 22:52:58 by ross]
missing part of rev. 1.13: in unfoldForestM_BF, the output sequence is
now in the right order, so don't reverse it.

13 years ago[project @ 2005-10-25 17:31:38 by sof]
sof [Tue, 25 Oct 2005 17:31:38 +0000 (17:31 +0000)] 
[project @ 2005-10-25 17:31:38 by sof]
FPTOOLS_CHECK_HTYPE: correctly scope the resetting of CPPFLAGS; as was,
it got blown away if the value was cached.

Merge to STABLE.

13 years ago[project @ 2005-10-25 12:01:11 by simonmar]
simonmar [Tue, 25 Oct 2005 12:01:11 +0000 (12:01 +0000)] 
[project @ 2005-10-25 12:01:11 by simonmar]
fix findExecutable (I hope; don't have an up to date Windows build to
test on).

13 years ago[project @ 2005-10-25 11:13:53 by simonmar]
simonmar [Tue, 25 Oct 2005 11:13:53 +0000 (11:13 +0000)] 
[project @ 2005-10-25 11:13:53 by simonmar]
forkIO the signal handlers directly from the IO manager thread, rather
than calling an RTS function to do the same thing.

13 years ago[project @ 2005-10-25 09:29:47 by ross]
ross [Tue, 25 Oct 2005 09:29:47 +0000 (09:29 +0000)] 
[project @ 2005-10-25 09:29:47 by ross]
add Monoid instance

13 years ago[project @ 2005-10-25 09:29:16 by ross]
ross [Tue, 25 Oct 2005 09:29:16 +0000 (09:29 +0000)] 
[project @ 2005-10-25 09:29:16 by ross]
Now that Data.Monoid is portable, move Monoid instances for sets and
maps back to where the data types are defined.

13 years ago[project @ 2005-10-25 09:11:25 by ross]
ross [Tue, 25 Oct 2005 09:11:25 +0000 (09:11 +0000)] 
[project @ 2005-10-25 09:11:25 by ross]
Change the Monoid instance for functions (as proposed on the libraries
list, and interpreting silence as assent) from composition to pointwise
combination.

Rationale: The new instance is consistent with the instances for tuples,
it's compositional, in that it builds instances for complex types out
of instances for simpler ones, and it makes this module Haskell 98.

Downside: the old instance was easy to use with Writer monads, and ShowS
was a special case.  You can get that effect using the new Endo type,
but you have to wrap and unwrap the newtype.

Also added a few other simple monoids: dual, sum and product.

13 years ago[project @ 2005-10-25 09:01:48 by simonmar]
simonmar [Tue, 25 Oct 2005 09:01:48 +0000 (09:01 +0000)] 
[project @ 2005-10-25 09:01:48 by simonmar]
Note that throwTo blocks if the target thread is in a foreign call.

13 years ago[project @ 2005-10-22 00:37:01 by ross]
ross [Sat, 22 Oct 2005 00:37:01 +0000 (00:37 +0000)] 
[project @ 2005-10-22 00:37:01 by ross]
docs (readListDefault seems pretty useless)

13 years ago[project @ 2005-10-22 00:28:21 by ross]
ross [Sat, 22 Oct 2005 00:28:21 +0000 (00:28 +0000)] 
[project @ 2005-10-22 00:28:21 by ross]
define readListPrec too.

13 years ago[project @ 2005-10-21 16:31:23 by ross]
ross [Fri, 21 Oct 2005 16:31:23 +0000 (16:31 +0000)] 
[project @ 2005-10-21 16:31:23 by ross]
oops

13 years ago[project @ 2005-10-21 16:25:45 by ross]
ross [Fri, 21 Oct 2005 16:25:45 +0000 (16:25 +0000)] 
[project @ 2005-10-21 16:25:45 by ross]
Data and FunctorM instances for View[LR].

13 years ago[project @ 2005-10-21 13:10:48 by simonmar]
simonmar [Fri, 21 Oct 2005 13:10:48 +0000 (13:10 +0000)] 
[project @ 2005-10-21 13:10:48 by simonmar]
cmp_thread returns CInt, not Int

13 years ago[project @ 2005-10-21 10:47:25 by ross]
ross [Fri, 21 Oct 2005 10:47:25 +0000 (10:47 +0000)] 
[project @ 2005-10-21 10:47:25 by ross]
conformant Show and Read instances.

(sorry to jump in, JP, but I had these to hand)