packages/old-time.git
16 years ago[project @ 2003-05-12 10:16:22 by ross]
ross [Mon, 12 May 2003 10:16:28 +0000 (10:16 +0000)] 
[project @ 2003-05-12 10:16:22 by ross]
documentation only: tag some things as "GHC only".

16 years ago[project @ 2003-05-12 10:15:00 by ross]
ross [Mon, 12 May 2003 10:15:00 +0000 (10:15 +0000)] 
[project @ 2003-05-12 10:15:00 by ross]
mark Text.Read as non-portable, and make a bit more available in Hugs.

16 years ago[project @ 2003-05-12 10:12:52 by ross]
ross [Mon, 12 May 2003 10:12:55 +0000 (10:12 +0000)] 
[project @ 2003-05-12 10:12:52 by ross]
Hugs only (I hope): add unboxed arrays to Hugs

16 years ago[project @ 2003-05-12 08:57:55 by ross]
ross [Mon, 12 May 2003 08:57:55 +0000 (08:57 +0000)] 
[project @ 2003-05-12 08:57:55 by ross]
cosmetic change

16 years ago[project @ 2003-05-12 08:55:53 by ross]
ross [Mon, 12 May 2003 08:55:53 +0000 (08:55 +0000)] 
[project @ 2003-05-12 08:55:53 by ross]
remove #ifndef __HUGS__

16 years ago[project @ 2003-05-12 08:54:21 by ross]
ross [Mon, 12 May 2003 08:54:21 +0000 (08:54 +0000)] 
[project @ 2003-05-12 08:54:21 by ross]
add Haddock markers

16 years ago[project @ 2003-05-12 08:48:09 by ross]
ross [Mon, 12 May 2003 08:48:09 +0000 (08:48 +0000)] 
[project @ 2003-05-12 08:48:09 by ross]
some re-arrangement for the benefit of Hugs.

16 years ago[project @ 2003-05-08 16:06:41 by ross]
ross [Thu, 8 May 2003 16:06:41 +0000 (16:06 +0000)] 
[project @ 2003-05-08 16:06:41 by ross]
avoid a C compiler warning about arithmetic with void *

16 years ago[project @ 2003-05-05 19:44:28 by ross]
ross [Mon, 5 May 2003 19:44:28 +0000 (19:44 +0000)] 
[project @ 2003-05-05 19:44:28 by ross]
non-GHC: fill out the Bits instances for Int and Integer, and make them
work with Hugs.

16 years ago[project @ 2003-04-30 08:36:21 by simonmar]
simonmar [Wed, 30 Apr 2003 08:36:21 +0000 (08:36 +0000)] 
[project @ 2003-04-30 08:36:21 by simonmar]
When doing hGetChar on a block-buffered handle, don't wait for the
buffer to be completely full before returning a character.  This
behaviour seems more useful, and matches what hGetLine and
hGetContents do.

Without this, to do an unbuffered read you have to set the buffering
on the Handle to NoBuffering, which adversely affects the performance
of writes.  With this change, there is now no difference between line
buffering and block buffering for read operations.

Possibly fillReadBuffer can now be simplified, since the is_line
parameter is always True.  However, this is a delicate part of the IO
library, and I don't want to remove the possiblity of forcing a
complete buffer-fill in the future.

16 years ago[project @ 2003-04-28 09:18:29 by ross]
ross [Mon, 28 Apr 2003 09:18:29 +0000 (09:18 +0000)] 
[project @ 2003-04-28 09:18:29 by ross]
add Text.ParserCombinators.ReadP, Text.ParserCombinators.ReadPrec and
Text.Read.Lex to Hugs.  (But they're not used by Read, because that
would make the Prelude non-H98).

16 years ago[project @ 2003-04-28 09:16:47 by ross]
ross [Mon, 28 Apr 2003 09:16:48 +0000 (09:16 +0000)] 
[project @ 2003-04-28 09:16:47 by ross]
portability fixes, plus marking these as non-portable (uses forall).

16 years ago[project @ 2003-04-25 17:43:06 by ross]
ross [Fri, 25 Apr 2003 17:43:06 +0000 (17:43 +0000)] 
[project @ 2003-04-25 17:43:06 by ross]
tiny haddock fix

16 years ago[project @ 2003-04-25 17:42:26 by ross]
ross [Fri, 25 Apr 2003 17:42:26 +0000 (17:42 +0000)] 
[project @ 2003-04-25 17:42:26 by ross]
add System.Info to Hugs

16 years ago[project @ 2003-04-25 10:24:58 by ross]
ross [Fri, 25 Apr 2003 10:24:58 +0000 (10:24 +0000)] 
[project @ 2003-04-25 10:24:58 by ross]
add Data.Array.Diff to Hugs

16 years ago[project @ 2003-04-25 10:24:20 by ross]
ross [Fri, 25 Apr 2003 10:24:20 +0000 (10:24 +0000)] 
[project @ 2003-04-25 10:24:20 by ross]
non-GHC: remove instances for Word

16 years ago[project @ 2003-04-25 10:23:29 by simonmar]
simonmar [Fri, 25 Apr 2003 10:23:29 +0000 (10:23 +0000)] 
[project @ 2003-04-25 10:23:29 by simonmar]
doc fixes

16 years ago[project @ 2003-04-24 12:25:26 by malcolm]
malcolm [Thu, 24 Apr 2003 12:25:28 +0000 (12:25 +0000)] 
[project @ 2003-04-24 12:25:26 by malcolm]
Add instances of Data.Bits.Bits for Int/Word[8,16,32,64] in a different
way.  The module Data.Bits is only available from the base package,
which is normally added to the link line *before* the standard libraries,
hence if the instances are in the latter, you get link errors.  So move
the instances into the base package where they belong, in NHC.SizedTypes.

16 years ago[project @ 2003-04-23 14:36:26 by malcolm]
malcolm [Wed, 23 Apr 2003 14:36:26 +0000 (14:36 +0000)] 
[project @ 2003-04-23 14:36:26 by malcolm]
Add Data.HashTable, Data.Monoid, and Data.Tree to the nhc98 build, and
re-instate Data.Dynamic, which now uses Data.HashTable.

16 years ago[project @ 2003-04-23 14:29:51 by malcolm]
malcolm [Wed, 23 Apr 2003 14:29:51 +0000 (14:29 +0000)] 
[project @ 2003-04-23 14:29:51 by malcolm]
Tweak #ifdefs to make it compile with nhc98.

16 years ago[project @ 2003-04-23 13:22:16 by simonmar]
simonmar [Wed, 23 Apr 2003 13:22:16 +0000 (13:22 +0000)] 
[project @ 2003-04-23 13:22:16 by simonmar]
Doc wibble.

16 years ago[project @ 2003-04-23 10:27:53 by simonmar]
simonmar [Wed, 23 Apr 2003 10:27:53 +0000 (10:27 +0000)] 
[project @ 2003-04-23 10:27:53 by simonmar]
hGetArray/hPutArray with a count argument of zero now just return
doing nothing.  This brings them into line with hGetBuf/hPutBuf and
fixes a bug in Data.PackedString.hPutPS which fails on an empty string.

16 years ago[project @ 2003-04-22 10:20:30 by malcolm]
malcolm [Tue, 22 Apr 2003 10:20:30 +0000 (10:20 +0000)] 
[project @ 2003-04-22 10:20:30 by malcolm]
Exclude Data.Dynamic from the nhc98 build now that it no longer
compiles.  (Need to investigate getting Data.HashTable to work.)

16 years ago[project @ 2003-04-22 09:21:34 by ross]
ross [Tue, 22 Apr 2003 09:21:34 +0000 (09:21 +0000)] 
[project @ 2003-04-22 09:21:34 by ross]
Hugs only: minor re-arrangement of ifdefs.

16 years ago[project @ 2003-04-22 09:19:24 by ross]
ross [Tue, 22 Apr 2003 09:19:24 +0000 (09:19 +0000)] 
[project @ 2003-04-22 09:19:24 by ross]
remove an ifdef'd out commented out import.

16 years ago[project @ 2003-04-21 16:32:39 by ross]
ross [Mon, 21 Apr 2003 16:32:39 +0000 (16:32 +0000)] 
[project @ 2003-04-21 16:32:39 by ross]
adjust imports for Hugs's benefit.

16 years ago[project @ 2003-04-21 16:32:05 by ross]
ross [Mon, 21 Apr 2003 16:32:05 +0000 (16:32 +0000)] 
[project @ 2003-04-21 16:32:05 by ross]
Hugs only: Key is defined in Hugs.Prelude (because it needs Dynamic)

16 years ago[project @ 2003-04-17 16:51:43 by simonpj]
simonpj [Thu, 17 Apr 2003 16:51:43 +0000 (16:51 +0000)] 
[project @ 2003-04-17 16:51:43 by simonpj]
Add lots of new generics stuff

16 years ago[project @ 2003-04-17 15:23:37 by simonpj]
simonpj [Thu, 17 Apr 2003 15:23:37 +0000 (15:23 +0000)] 
[project @ 2003-04-17 15:23:37 by simonpj]
----------------------------------
Implement Typeable properly
----------------------------------

1.  Add 'deriving' for Typeable class. So you can say

data T a b = .... deriving( Typeable )

    At the moment you only get this if you ask for it. If you say
    nothing you get nothing.

2.  Implement Typeable better, with proper O(1) comparison of
    type representations

3.  Add the 'cast' operation described in 'Scrap your boilerplate'
    and use it.

4.  Consequence: need to move the definition of IOArray from
    Data.Array.IO.Internals to GHC.IOBase, where it joins IORef.
    This is necssary so that HashTable can be low down in the compilation
    hierarchy, and hence so can Dynamic.

WARNING: I'm not certain the imports in HashTable and Dynamic
 will all be right for Hugs and NHC. I hope you can
    fix them up.

16 years ago[project @ 2003-04-17 15:17:07 by simonpj]
simonpj [Thu, 17 Apr 2003 15:17:12 +0000 (15:17 +0000)] 
[project @ 2003-04-17 15:17:07 by simonpj]
Comments and imports

16 years ago[project @ 2003-04-17 13:26:59 by simonmar]
simonmar [Thu, 17 Apr 2003 13:26:59 +0000 (13:26 +0000)] 
[project @ 2003-04-17 13:26:59 by simonmar]
Doc wibbles

16 years ago[project @ 2003-04-17 12:58:14 by mthomas]
mthomas [Thu, 17 Apr 2003 12:58:14 +0000 (12:58 +0000)] 
[project @ 2003-04-17 12:58:14 by mthomas]
Fix "System/Posix/Internals.hs:273: Malformed entity string".

16 years ago[project @ 2003-04-17 10:44:59 by simonmar]
simonmar [Thu, 17 Apr 2003 10:44:59 +0000 (10:44 +0000)] 
[project @ 2003-04-17 10:44:59 by simonmar]
Add a hash table implementation.  This is an implementation of Dynamic
Hash Tables, transliterated from the code in GHC's RTS into Haskell.
I'd like to say it looks nicer, and well, maybe it does a little.

Comments on the interface are welcome.

This hash table implementation will be used by the new Typeable
framework to do hash-consing and fast comparison of TypeRep values.

16 years ago[project @ 2003-04-17 07:26:12 by simonpj]
simonpj [Thu, 17 Apr 2003 07:26:12 +0000 (07:26 +0000)] 
[project @ 2003-04-17 07:26:12 by simonpj]
Better Haddock documentation

16 years ago[project @ 2003-04-17 07:01:27 by simonpj]
simonpj [Thu, 17 Apr 2003 07:01:27 +0000 (07:01 +0000)] 
[project @ 2003-04-17 07:01:27 by simonpj]
Start on better Typeable

16 years ago[project @ 2003-04-16 15:12:02 by sof]
sof [Wed, 16 Apr 2003 15:12:02 +0000 (15:12 +0000)] 
[project @ 2003-04-16 15:12:02 by sof]
hGetArray: wrong result length returned.

Merge to STABLE (if that's still on.)

16 years ago[project @ 2003-04-15 12:42:13 by malcolm]
malcolm [Tue, 15 Apr 2003 12:42:13 +0000 (12:42 +0000)] 
[project @ 2003-04-15 12:42:13 by malcolm]
Add unlinesPS, unwordsPS, joinPS, and splitWithPS, to the nhc98 version
of the code.

16 years ago[project @ 2003-04-15 10:41:14 by simonmar]
simonmar [Tue, 15 Apr 2003 10:41:14 +0000 (10:41 +0000)] 
[project @ 2003-04-15 10:41:14 by simonmar]
Re-instate joinPS which appears to have been accidentally left out of
this revised version of PackedString, and add unlinesPS and unwordsPS
which are the analogs of Data.List.unlines and Data.List.unwords
respectively.

Fix bug: linesPS doesn't work the same way as Data.List.lines, because
it strips out empty lines, and it therefore isn't the inverse of
unlinesPS.  This is because linesPS is defined in terms of splitPS,
which omits empty substrings.  However, the comments next to
splitPS/splitWithPS state that the following should hold:

  joinPS (packString [x]) (splitPS x ls) = ls

which implies that splitPS should *not* omit empty substrings.  So the
definition of splitPS is inconsistent.  I therefore opted to fix
splitPS to make the above property hold, and modify wordsPS to work
with the new definition (it previously relied on the old behaviour).

16 years ago[project @ 2003-04-11 23:39:43 by ross]
ross [Fri, 11 Apr 2003 23:39:44 +0000 (23:39 +0000)] 
[project @ 2003-04-11 23:39:43 by ross]
Hugs only: add a CBITS "pragma" to tell the Hugs conversion script which
files from <package>/cbits should be linked with the module by ffihugs,
e.g. {-# CBITS HsNet.c initWinSock.c ancilData.c #-}

16 years ago[project @ 2003-04-11 14:24:07 by simonmar]
simonmar [Fri, 11 Apr 2003 14:24:07 +0000 (14:24 +0000)] 
[project @ 2003-04-11 14:24:07 by simonmar]
Plug a file descriptor leak: when finalizing a handle, we should
ignore errors in the flushing operation and go ahead and close the
handle anyway.

Spotted by: Keean [k.schupke@ic.ac.uk]

16 years ago[project @ 2003-04-11 11:43:09 by ross]
ross [Fri, 11 Apr 2003 11:43:09 +0000 (11:43 +0000)] 
[project @ 2003-04-11 11:43:09 by ross]
Hugs only: use the whole thing now

16 years ago[project @ 2003-04-11 11:10:57 by ross]
ross [Fri, 11 Apr 2003 11:10:59 +0000 (11:10 +0000)] 
[project @ 2003-04-11 11:10:57 by ross]
rename Control.Monad.Monoid as Data.Monoid

16 years ago[project @ 2003-04-11 10:41:23 by ross]
ross [Fri, 11 Apr 2003 10:41:23 +0000 (10:41 +0000)] 
[project @ 2003-04-11 10:41:23 by ross]
move #hide to where it works

16 years ago[project @ 2003-04-11 10:11:24 by ross]
ross [Fri, 11 Apr 2003 10:11:25 +0000 (10:11 +0000)] 
[project @ 2003-04-11 10:11:24 by ross]
rename GHC.Posix as System.Posix.Internals

16 years ago[project @ 2003-04-09 10:21:09 by simonpj]
simonpj [Wed, 9 Apr 2003 10:21:09 +0000 (10:21 +0000)] 
[project @ 2003-04-09 10:21:09 by simonpj]
Typo

16 years ago[project @ 2003-04-09 08:18:13 by simonpj]
simonpj [Wed, 9 Apr 2003 08:18:13 +0000 (08:18 +0000)] 
[project @ 2003-04-09 08:18:13 by simonpj]
-------------------------------------
      Fix the lexer so that it does the right thing
for floating point and hexadecimal numbers
-------------------------------------

This fix requires the new (<++) combinator that Koen has
added to the ReadP library.

NB: we lex "0x9fw" as [("0x9f", "w")]; that is, we stop as soon
as we get a legal thing (maximally munching) even if white space
does not follow.  I'm not totally certain this is the right thing,
but it's much better than it was before.

16 years ago[project @ 2003-04-09 08:17:39 by simonpj]
simonpj [Wed, 9 Apr 2003 08:17:39 +0000 (08:17 +0000)] 
[project @ 2003-04-09 08:17:39 by simonpj]
Remove redundant Prelude import

16 years ago[project @ 2003-04-08 16:14:29 by simonpj]
simonpj [Tue, 8 Apr 2003 16:14:29 +0000 (16:14 +0000)] 
[project @ 2003-04-08 16:14:29 by simonpj]
add fixity for +++, <++

16 years ago[project @ 2003-04-08 16:02:05 by simonpj]
simonpj [Tue, 8 Apr 2003 16:02:05 +0000 (16:02 +0000)] 
[project @ 2003-04-08 16:02:05 by simonpj]
New ReadP module from Koen, featuring <++ combinator

16 years ago[project @ 2003-04-08 14:52:26 by ross]
ross [Tue, 8 Apr 2003 14:52:26 +0000 (14:52 +0000)] 
[project @ 2003-04-08 14:52:26 by ross]
import tweak

16 years ago[project @ 2003-04-04 16:12:01 by ross]
ross [Fri, 4 Apr 2003 16:12:01 +0000 (16:12 +0000)] 
[project @ 2003-04-04 16:12:01 by ross]
Added a list of the modules in the package that don't work with Hugs.
Such modules are skipped by the conversion script.  Packages in which
everything works with Hugs don't need such a file.

16 years ago[project @ 2003-04-04 14:36:31 by simonpj]
simonpj [Fri, 4 Apr 2003 14:36:31 +0000 (14:36 +0000)] 
[project @ 2003-04-04 14:36:31 by simonpj]
lexChar wibblifications

16 years ago[project @ 2003-04-03 16:46:59 by ross]
ross [Thu, 3 Apr 2003 16:47:00 +0000 (16:47 +0000)] 
[project @ 2003-04-03 16:46:59 by ross]
Graph and Tree modules, from GHC's Digraph (actually the Haddock version,
which looks more recent).

16 years ago[project @ 2003-04-01 16:32:04 by simonpj]
simonpj [Tue, 1 Apr 2003 16:32:04 +0000 (16:32 +0000)] 
[project @ 2003-04-01 16:32:04 by simonpj]
Fix bogus implementation of readLitChar, lexLitChar

16 years ago[project @ 2003-04-01 16:30:37 by simonpj]
simonpj [Tue, 1 Apr 2003 16:30:37 +0000 (16:30 +0000)] 
[project @ 2003-04-01 16:30:37 by simonpj]
Use INLINE rather than SPECIALISE for ceiling, floor, truncate

16 years ago[project @ 2003-03-31 15:36:24 by ross]
ross [Mon, 31 Mar 2003 15:36:24 +0000 (15:36 +0000)] 
[project @ 2003-03-31 15:36:24 by ross]
remove a GHC-ism

16 years ago[project @ 2003-03-31 13:58:43 by simonmar]
simonmar [Mon, 31 Mar 2003 13:58:43 +0000 (13:58 +0000)] 
[project @ 2003-03-31 13:58:43 by simonmar]
Get the filename right in IOErrors generated by several functions in
here.

16 years ago[project @ 2003-03-31 13:58:03 by simonmar]
simonmar [Mon, 31 Mar 2003 13:58:03 +0000 (13:58 +0000)] 
[project @ 2003-03-31 13:58:03 by simonmar]
- Add ioeSet{ErrorType,ErrorString,Handle,FileName} to match the
  existing ioeGet* functions.

- Add modifyIOError :: (IOError -> IOError) -> IO a -> IO a

16 years ago[project @ 2003-03-30 12:20:16 by ross]
ross [Sun, 30 Mar 2003 12:20:17 +0000 (12:20 +0000)] 
[project @ 2003-03-30 12:20:16 by ross]
withForeignPtr is portable.  So is some other stuff, though only Hugs
uses the portable versions at present.

16 years ago[project @ 2003-03-27 10:24:43 by simonmar]
simonmar [Thu, 27 Mar 2003 10:24:43 +0000 (10:24 +0000)] 
[project @ 2003-03-27 10:24:43 by simonmar]
[ oops, forgot to commit this with the rest of the changes yesterday... ]

Change our ForeignPtr implementation to match the spec: finalizers
must now be foreign functions.

Move the old Haskell-finalizer versions of newForeignPtr and
addForeignPtrFinalizer into Foreign.Concurrent, to make it clear that
the implementations of these functions require concurrency.

While I'm here: move the GHC-specific parts of the ForeignPtr
implementation into GHC.ForeignPtr.

16 years ago[project @ 2003-03-26 15:25:46 by simonmar]
simonmar [Wed, 26 Mar 2003 15:25:46 +0000 (15:25 +0000)] 
[project @ 2003-03-26 15:25:46 by simonmar]
Change our ForeignPtr implementation to match the spec: finalizers
must now be foreign functions.

Move the old Haskell-finalizer versions of newForeignPtr and
addForeignPtrFinalizer into Foreign.Concurrent, to make it clear that
the implementations of these functions require concurrency.

While I'm here: move the GHC-specific parts of the ForeignPtr
implementation into GHC.ForeignPtr.

16 years ago[project @ 2003-03-26 12:35:34 by simonmar]
simonmar [Wed, 26 Mar 2003 12:35:34 +0000 (12:35 +0000)] 
[project @ 2003-03-26 12:35:34 by simonmar]
Add getrlimit()/setrlimit() suppport

16 years ago[project @ 2003-03-14 13:08:04 by simonmar]
simonmar [Fri, 14 Mar 2003 13:08:04 +0000 (13:08 +0000)] 
[project @ 2003-03-14 13:08:04 by simonmar]
Attach the finalizer to the write side of a duplex handle, where it
should have been.  Otherwise finalization of duplex handles doesn't
work properly.

MERGE TO STABLE

16 years ago[project @ 2003-03-12 16:42:27 by ijones]
ijones [Wed, 12 Mar 2003 16:42:27 +0000 (16:42 +0000)] 
[project @ 2003-03-12 16:42:27 by ijones]
* Added more Haddock documentation to functions / classes / types
* Added section headings for classes / types
* Added an Examples section

16 years ago[project @ 2003-03-11 18:41:43 by panne]
panne [Tue, 11 Mar 2003 18:41:43 +0000 (18:41 +0000)] 
[project @ 2003-03-11 18:41:43 by panne]
Fixed link to getArgs

16 years ago[project @ 2003-03-09 20:19:27 by panne]
panne [Sun, 9 Mar 2003 20:19:27 +0000 (20:19 +0000)] 
[project @ 2003-03-09 20:19:27 by panne]
Fixed markup confusion ("" vs. '')

16 years ago[project @ 2003-03-08 23:03:47 by panne]
panne [Sat, 8 Mar 2003 23:03:49 +0000 (23:03 +0000)] 
[project @ 2003-03-08 23:03:47 by panne]
More markup fixes...

16 years ago[project @ 2003-03-08 19:02:39 by panne]
panne [Sat, 8 Mar 2003 19:02:39 +0000 (19:02 +0000)] 
[project @ 2003-03-08 19:02:39 by panne]
Fixed some broken/redirected/canonicalized links found by a very picky
link checker.

16 years ago[project @ 2003-03-06 09:51:03 by simonmar]
simonmar [Thu, 6 Mar 2003 09:51:03 +0000 (09:51 +0000)] 
[project @ 2003-03-06 09:51:03 by simonmar]
Add Data/Array/IO to list of directories

16 years ago[project @ 2003-03-05 15:54:59 by malcolm]
malcolm [Wed, 5 Mar 2003 15:54:59 +0000 (15:54 +0000)] 
[project @ 2003-03-05 15:54:59 by malcolm]
For nhc98, use nullPtr rather than 0 as the argument to time().

16 years ago[project @ 2003-03-05 15:53:10 by malcolm]
malcolm [Wed, 5 Mar 2003 15:53:10 +0000 (15:53 +0000)] 
[project @ 2003-03-05 15:53:10 by malcolm]
Build the hierarchical libraries from .hc files when building nhc98 from .hc's.

16 years ago[project @ 2003-03-04 13:36:39 by ross]
ross [Tue, 4 Mar 2003 13:36:39 +0000 (13:36 +0000)] 
[project @ 2003-03-04 13:36:39 by ross]
add an #ifdef __GLASGOW_HASKELL__

16 years ago[project @ 2003-03-04 11:09:15 by simonmar]
simonmar [Tue, 4 Mar 2003 11:09:15 +0000 (11:09 +0000)] 
[project @ 2003-03-04 11:09:15 by simonmar]
Split Data.Array.IO into Data.Array.IO.Internals (which defines and
exports the concrete representations of IOArray and IOUArray) and
Data.Array.IO which exports the user-visible API.

This is necessary so that we can build more libraries that use
the internals of IOUArray in particular.

16 years ago[project @ 2003-02-28 12:34:43 by stolz]
stolz [Fri, 28 Feb 2003 12:34:43 +0000 (12:34 +0000)] 
[project @ 2003-02-28 12:34:43 by stolz]
- Rename System.Posix.Process.forkProcess to forkProcessAll
- Move GHC.Conc.forkProcess to System.Posix with type 'Maybe ProcessID'

Prompted by: George Russel

16 years ago[project @ 2003-02-26 10:22:14 by simonmar]
simonmar [Wed, 26 Feb 2003 10:22:14 +0000 (10:22 +0000)] 
[project @ 2003-02-26 10:22:14 by simonmar]
Add a note about the problem with forkProcess, for the time being.

16 years ago[project @ 2003-02-21 05:34:12 by sof]
sof [Fri, 21 Feb 2003 05:34:13 +0000 (05:34 +0000)] 
[project @ 2003-02-21 05:34:12 by sof]
Asynchronous / non-blocking I/O for Win32 platforms.

This commit introduces a Concurrent Haskell friendly view of I/O on
Win32 platforms. Through the use of a pool of worker Win32 threads, CH
threads may issue asynchronous I/O requests without blocking the
progress of other CH threads. The issuing CH thread is blocked until
the request has been serviced though.

GHC.Conc exports the primops that take care of issuing the
asynchronous I/O requests, which the IO implementation now takes
advantage of. By default, all Handles are non-blocking/asynchronous,
but should performance become an issue, having a per-Handle flag for
turning off non-blocking could easily be imagined&introduced.

[Incidentally, this thread pool-based implementation could easily be
extended to also allow Haskell code to delegate the execution of
arbitrary pieces of (potentially blocking) external code to another OS
thread. Given how relatively gnarly the locking story has turned out
to be with the 'threaded' RTS, that may not be such a bad idea.]

16 years ago[project @ 2003-02-20 09:36:40 by malcolm]
malcolm [Thu, 20 Feb 2003 09:36:40 +0000 (09:36 +0000)] 
[project @ 2003-02-20 09:36:40 by malcolm]
Add Foreign.Marshal.Pool to the nhc98 build.

16 years ago[project @ 2003-02-19 13:54:19 by malcolm]
malcolm [Wed, 19 Feb 2003 13:54:19 +0000 (13:54 +0000)] 
[project @ 2003-02-19 13:54:19 by malcolm]
Oops, the "directory-collecting" modules Foreign and Foreign.Marshal were
accidentally omitted from the nhc98 build.

16 years ago[project @ 2003-02-18 20:39:56 by panne]
panne [Tue, 18 Feb 2003 20:39:56 +0000 (20:39 +0000)] 
[project @ 2003-02-18 20:39:56 by panne]
Guerrilla tactics: Re-export Foreign.Marshal.Pool  >:-)

16 years ago[project @ 2003-02-18 20:15:15 by panne]
panne [Tue, 18 Feb 2003 20:15:15 +0000 (20:15 +0000)] 
[project @ 2003-02-18 20:15:15 by panne]
* Fixed bug #687034 (GetOpt overly ambiguous)
* Reformatted comment
* Synch example with reality

16 years ago[project @ 2003-02-17 15:13:56 by simonpj]
simonpj [Mon, 17 Feb 2003 15:13:56 +0000 (15:13 +0000)] 
[project @ 2003-02-17 15:13:56 by simonpj]
Wibbles to ST Monad methods; I forget why

16 years ago[project @ 2003-02-17 15:13:09 by simonpj]
simonpj [Mon, 17 Feb 2003 15:13:09 +0000 (15:13 +0000)] 
[project @ 2003-02-17 15:13:09 by simonpj]
Type sig for getTag

16 years ago[project @ 2003-02-17 11:43:21 by simonmar]
simonmar [Mon, 17 Feb 2003 11:43:21 +0000 (11:43 +0000)] 
[project @ 2003-02-17 11:43:21 by simonmar]
Comment wibble

16 years ago[project @ 2003-02-14 17:11:59 by sof]
sof [Fri, 14 Feb 2003 17:12:00 +0000 (17:12 +0000)] 
[project @ 2003-02-14 17:11:59 by sof]
- add missing config.h include to Handle.hs
- Handle.hSetBuffering: don't bother putting the handle's FD into
  'raw' mode under Win32. 'raw' mode is just too specialised and
  potentially confusing (see comments.)

16 years ago[project @ 2003-02-14 13:01:32 by simonpj]
simonpj [Fri, 14 Feb 2003 13:01:32 +0000 (13:01 +0000)] 
[project @ 2003-02-14 13:01:32 by simonpj]
Fix for deriving of records with leading underscore, and corresponding lex

16 years ago[project @ 2003-02-06 10:41:13 by simonmar]
simonmar [Thu, 6 Feb 2003 10:41:13 +0000 (10:41 +0000)] 
[project @ 2003-02-06 10:41:13 by simonmar]
Aargh!  We were setting the VMIN and VTIME values in the termios
structure when the terminal is in non-raw mode, rather than raw mode,
because I had a test round the wrong way.

Apparently on Linux VMIN and VTIME default to 1/0, so it apparently
worked properly, but on Solaris the VMIN slot in the c_cc array is
shared with the VEOF slot, which meant that VMIN was being left as 4
(the value of ^D, which is the default contents of VEOF).

Thanks to Hal Daume for reporting the bug, and Malcolm Wallce &
Lennart Augustsson for helping to point me in the right direction.

MERGE TO STABLE

16 years ago[project @ 2003-02-06 10:41:10 by ross]
ross [Thu, 6 Feb 2003 10:41:10 +0000 (10:41 +0000)] 
[project @ 2003-02-06 10:41:10 by ross]
Hugs-only: special definitions of fromInt & fromDouble.

16 years ago[project @ 2003-02-04 11:55:54 by simonmar]
simonmar [Tue, 4 Feb 2003 11:55:54 +0000 (11:55 +0000)] 
[project @ 2003-02-04 11:55:54 by simonmar]
Add support for using vfork, which I apparently removed when this file
was moved over from ghc/lib/std/cbits.  Using vfork on Linux makes
quite a big difference - eg. when building GHC.Base with -split-objs ,
I saw a 2.5s reduction in system time.

16 years ago[project @ 2003-01-30 20:41:10 by panne]
panne [Thu, 30 Jan 2003 20:41:10 +0000 (20:41 +0000)] 
[project @ 2003-01-30 20:41:10 by panne]
* Fixed the comment breakage of the previous commit (Haddock failure)
* Synched signature comments in header with reality
* Added default implementation of 'rotate' in terms of 'rotateL'/'rotateR'
* Removed spurios "signed": What's a signed rotate or a signed left shift??

16 years ago[project @ 2003-01-30 12:51:05 by ross]
ross [Thu, 30 Jan 2003 12:51:05 +0000 (12:51 +0000)] 
[project @ 2003-01-30 12:51:05 by ross]
fix for non-GHC

16 years ago[project @ 2003-01-29 14:28:47 by ross]
ross [Wed, 29 Jan 2003 14:28:47 +0000 (14:28 +0000)] 
[project @ 2003-01-29 14:28:47 by ross]
fix typo that broke non-GHC impls.

16 years ago[project @ 2003-01-29 07:54:46 by panne]
panne [Wed, 29 Jan 2003 07:54:46 +0000 (07:54 +0000)] 
[project @ 2003-01-29 07:54:46 by panne]
Ooops, unbreak non-GHC targets...

16 years ago[project @ 2003-01-28 21:48:23 by panne]
panne [Tue, 28 Jan 2003 21:48:23 +0000 (21:48 +0000)] 
[project @ 2003-01-28 21:48:23 by panne]
As agreed (= no riots after the proposal :-) on the FFI list,
introduce a re-exporting module Foreign.Marshal

16 years ago[project @ 2003-01-28 21:38:30 by panne]
panne [Tue, 28 Jan 2003 21:38:30 +0000 (21:38 +0000)] 
[project @ 2003-01-28 21:38:30 by panne]
After trying out re-exporting Foreign.Marshal.Pool from Marshal, it
became obvious that -fno-implicit-prelude would be a good idea. :-}
Otherwise one gets cirular dependencies to the Prelude. Alas, fixing
this resulted in some uglification of the code in some places...

16 years ago[project @ 2003-01-28 11:09:41 by simonmar]
simonmar [Tue, 28 Jan 2003 11:09:41 +0000 (11:09 +0000)] 
[project @ 2003-01-28 11:09:41 by simonmar]
Provide hand-optimised versions of all the functions herein, protected
by #ifdef __GLASGOW_HASKELL__.

In a quick test, withCString is at least 5 times faster than before.

This isn't really the right way to do it: we should get deforestation
working between the various component functions and let GHC do its
stuff, but I couldn't quite get that to work.

16 years ago[project @ 2003-01-28 11:07:39 by simonmar]
simonmar [Tue, 28 Jan 2003 11:07:39 +0000 (11:07 +0000)] 
[project @ 2003-01-28 11:07:39 by simonmar]
Hand-optimised versions of pokeArray and pokeArray0 (selected via
#ifdef __GLASGOW_HASKELL__).

I tried to make these functions amenable to deforestation, but
couildn't quite get it to work, so in the meantime we'll settle for
hand-written versions which are still quite a bit faster than the
originals.

16 years ago[project @ 2003-01-25 15:54:51 by wolfgang]
wolfgang [Sat, 25 Jan 2003 15:54:51 +0000 (15:54 +0000)] 
[project @ 2003-01-25 15:54:51 by wolfgang]
This commit fixes many bugs and limitations in the threaded RTS.
There are still some issues remaining, though.

The following bugs should have been fixed:

- [+] "safe" calls could cause crashes
- [+] yieldToReturningWorker/grabReturnCapability
    -     It used to deadlock.
- [+] couldn't wake blocked workers
    -     Calls into the RTS could go unanswered for a long time, and
          that includes ordinary callbacks in some circumstances.
- [+] couldn't block on an MVar and expect to be woken up by a signal
      handler
    -     Depending on the exact situation, the RTS shut down or
          blocked forever and ignored the signal.
- [+] The locking scheme in RtsAPI.c didn't work
- [+] run_thread label in wrong place (schedule())
- [+] Deadlock in GHC.Handle
    -     if a signal arrived at the wrong time, an mvar was never
          filled again
- [+] Signals delivered to the "wrong" thread were ignored or handled
      too late.

Issues:
*) If GC can move TSO objects (I don't know - can it?), then ghci
will occasionally crash when calling foreign functions, because the
parameters are stored on the TSO stack.

*) There is still a race condition lurking in the code
(both threaded and non-threaded RTS are affected):
If a signal arrives after the check for pending signals in
schedule(), but before the call to select() in awaitEvent(),
select() will be called anyway. The signal handler will be
executed much later than expected.

*) For Win32, GHC doesn't yet support non-blocking IO, so while a
thread is waiting for IO, no call-ins can happen. If the RTS is
blocked in awaitEvent, it uses a polling loop on Win32, so call-ins
should work (although the polling loop looks ugly).

*) Deadlock detection is disabled for the threaded rts, because I
don't know how to do it properly in the presence of foreign call-ins
from foreign threads.
This causes the tests conc031, conc033 and conc034 to fail.

*) "safe" is currently treated as "threadsafe". Implementing "safe" in
a way that blocks other Haskell threads is more difficult than was
thought at first. I think it could be done with a few additional lines
of code, but personally, I'm strongly in favour of abolishing the
distinction.

*) Running finalizers at program termination is inefficient - there
are two OS threads passing messages back and forth for every finalizer
that is run. Also (just as in the non-threaded case) the finalizers
are run in parallel to any remaining haskell threads and to any
foreign call-ins that might still happen.

16 years ago[project @ 2003-01-24 15:18:46 by malcolm]
malcolm [Fri, 24 Jan 2003 15:18:46 +0000 (15:18 +0000)] 
[project @ 2003-01-24 15:18:46 by malcolm]
Move the 'shiftL/R' and 'rotateL/R' variants to become methods of
the Bits class.  This gives an instance the choice of which methods
(directional, or unified) to implement directly.  (This change was
agreed in Sept 2002, but is only being committed now.)

Add instances for Int and Integer in nhc98.

16 years ago[project @ 2003-01-24 14:04:41 by simonmar]
simonmar [Fri, 24 Jan 2003 14:04:41 +0000 (14:04 +0000)] 
[project @ 2003-01-24 14:04:41 by simonmar]
- Generalise seq to allow an unlifted type in its second argument.  This
  works because seq is *always* inlined and replaced by a case.

- Remove getTag, a wired-in Id with an unfolding, with a definition
  in GHC.Base:

getTag x = x `seq` dataToTag# x

  this is why we required the above generalisation to seq (dataToTag#
  returns an Int#).  See the comments in GHC.Base for more details.

- As a side-effect, this fixes a bug in the interpreter, where the
  compiler optimised away the evaluation of the argument to dataToTag#,
  but the interpreter ended up passing it an unevaluated thunk (nullary
  constructors aren't always evaluated in GHCi, but the simplifier
  assumes they are).  Now, in the interpreter, getTag won't be inlined
  so the compiler can't optimise away the evaluation, and we're saved.

  The real bug here is either (a) dataToTag# requires an evaluated
  argument or (b) the interpreter doesn't supply it with one, take your
  pick.

16 years ago[project @ 2003-01-23 18:06:01 by panne]
panne [Thu, 23 Jan 2003 18:06:01 +0000 (18:06 +0000)] 
[project @ 2003-01-23 18:06:01 by panne]
Added (not-so-standard ;-) support for pooled memory management.
No GHC-specifics like the use of arenas yet...