ghc-base.git
21 years ago[project @ 2002-10-11 11:05:20 by malcolm]
malcolm [Fri, 11 Oct 2002 11:05:20 +0000 (11:05 +0000)]
[project @ 2002-10-11 11:05:20 by malcolm]
Make some more libraries buildable with nhc98.

21 years ago[project @ 2002-10-09 17:24:12 by malcolm]
malcolm [Wed, 9 Oct 2002 17:24:13 +0000 (17:24 +0000)]
[project @ 2002-10-09 17:24:12 by malcolm]
Add #ifdefs for nhc98.

21 years ago[project @ 2002-10-09 17:08:18 by malcolm]
malcolm [Wed, 9 Oct 2002 17:08:19 +0000 (17:08 +0000)]
[project @ 2002-10-09 17:08:18 by malcolm]
Add #ifdefs for nhc98.

21 years ago[project @ 2002-10-09 16:55:30 by malcolm]
malcolm [Wed, 9 Oct 2002 16:55:30 +0000 (16:55 +0000)]
[project @ 2002-10-09 16:55:30 by malcolm]
Add a little infrastructure for building the hierarchical libraries
with nhc98.

21 years ago[project @ 2002-10-08 08:03:01 by wolfgang]
wolfgang [Tue, 8 Oct 2002 08:03:02 +0000 (08:03 +0000)]
[project @ 2002-10-08 08:03:01 by wolfgang]
Make the new Posix bindings compile on Mac OS X.
Most notable, Mac OS X lacks
*) lchown
*) SIGPOLL
I don't know of a replacement of either, so they are just left out when
they are not detected by configure.

21 years ago[project @ 2002-10-03 15:19:15 by ross]
ross [Thu, 3 Oct 2002 15:19:15 +0000 (15:19 +0000)]
[project @ 2002-10-03 15:19:15 by ross]
Reinstate the exports of the function names, because the module must
export them, even though Hugs doesn't define them here.  The old module
export they overlapped with was there to pick up the tuple definitions
for GHC, but that probably isn't necessary with the recent GHC changes.

21 years ago[project @ 2002-10-03 13:56:12 by panne]
panne [Thu, 3 Oct 2002 13:56:12 +0000 (13:56 +0000)]
[project @ 2002-10-03 13:56:12 by panne]
Warning police #9: Nuked modules from the export list which are
already implied by other exported modules. Still quite a few warnings
left here, though... >:-(

21 years ago[project @ 2002-10-03 13:41:35 by panne]
panne [Thu, 3 Oct 2002 13:41:35 +0000 (13:41 +0000)]
[project @ 2002-10-03 13:41:35 by panne]
Warning police #8: Exporting Foo(..) exports Foo's field selector
functions, too, so let's nuke the latter from the export list.

21 years ago[project @ 2002-10-03 13:29:07 by panne]
panne [Thu, 3 Oct 2002 13:29:07 +0000 (13:29 +0000)]
[project @ 2002-10-03 13:29:07 by panne]
Warning police #7: Improved typing of TSOs a bit, getting rid of a
bunch of C compiler warnings.

21 years ago[project @ 2002-10-03 13:04:58 by panne]
panne [Thu, 3 Oct 2002 13:04:58 +0000 (13:04 +0000)]
[project @ 2002-10-03 13:04:58 by panne]
Warning police #6: Add prototype for writeErrString__, which is used
by GHC.TopHandler.

21 years ago[project @ 2002-10-03 12:57:42 by panne]
panne [Thu, 3 Oct 2002 12:57:42 +0000 (12:57 +0000)]
[project @ 2002-10-03 12:57:42 by panne]
Warning police #5: Nuked duplicate exports, simplifying (i.e. nuking
:-) the export list on the way. The deep and arcane reasons for the
strange #ifdef-ery in this module are not clear to me, so I hope no
damage is done by this commit. :-}

21 years ago[project @ 2002-10-03 12:43:50 by panne]
panne [Thu, 3 Oct 2002 12:43:50 +0000 (12:43 +0000)]
[project @ 2002-10-03 12:43:50 by panne]
Warning police #4: To use uname, we should try to #include
<sys/utsname.h>.

21 years ago[project @ 2002-10-01 16:29:47 by ross]
ross [Tue, 1 Oct 2002 16:29:47 +0000 (16:29 +0000)]
[project @ 2002-10-01 16:29:47 by ross]
Removed the strict ST instance (already in Control.Monad.ST) and moved
the lazy ST instance to Control.Monad.ST.Lazy, so Control.Monad.Fix
contains only instances for Prelude types, and is portable.

21 years ago[project @ 2002-10-01 15:58:11 by erkok]
erkok [Tue, 1 Oct 2002 15:58:12 +0000 (15:58 +0000)]
[project @ 2002-10-01 15:58:11 by erkok]
Merge Fix.hs with MonadRec.hs, and remove the latter.

As agreed, the class is now called "MonadFix", and the
library is called "Control.Monad.Fix".

Note: The old Control.Monad.Fix used to export the function

      fix :: (a -> a) -> a

I retained that behavior, but I don't think it should export it.

21 years ago[project @ 2002-10-01 10:32:11 by ross]
ross [Tue, 1 Oct 2002 10:32:11 +0000 (10:32 +0000)]
[project @ 2002-10-01 10:32:11 by ross]
Hugs only: reinstate infix declarations.  It seems the Hugs limitation
this was working around no longer exists.

21 years ago[project @ 2002-09-30 14:31:02 by ross]
ross [Mon, 30 Sep 2002 14:31:03 +0000 (14:31 +0000)]
[project @ 2002-09-30 14:31:02 by ross]
Portability tweak.

21 years ago[project @ 2002-09-30 10:27:49 by simonmar]
simonmar [Mon, 30 Sep 2002 10:27:49 +0000 (10:27 +0000)]
[project @ 2002-09-30 10:27:49 by simonmar]
s/rm -f/$(RM)/

21 years ago[project @ 2002-09-29 20:24:00 by panne]
panne [Sun, 29 Sep 2002 20:24:00 +0000 (20:24 +0000)]
[project @ 2002-09-29 20:24:00 by panne]
Warning police #1: Nuke duplicate export of CSsize(..)

21 years ago[project @ 2002-09-27 23:10:23 by erkok]
erkok [Fri, 27 Sep 2002 23:10:23 +0000 (23:10 +0000)]
[project @ 2002-09-27 23:10:23 by erkok]
The MonadRec.hs library, stolen from the Hugs release.

Note: There's a clear overlap with the library Control.Monad.Fix.

      Unfortunately, the names of the classes are different, mainly
      for historical reasons (MonadFix vs MonadRec.) There was some
      discussion on how to resolve this a while back, but I guess
      Hugs and GHC went their own ways. Once the dust settles, we
      can agree on something common, and make Hugs and GHC use the same
      names. (Note that this duplication also exists in the current
      release of Hugs as well.) For the time being, this file helps
      keep things simple with regard to the already existing code
      that uses the mdo-notation.. (i.e., it also defines instances
      for the LazyST, ST, and list monads in addition
      to the ones defined in Fix.hs: IO and maybe.)

We can also name this file just "Rec", but "MonadRec" sounds less
confusing, and more inline with the Hugs release.

21 years ago[project @ 2002-09-26 09:16:33 by simonpj]
simonpj [Thu, 26 Sep 2002 09:16:33 +0000 (09:16 +0000)]
[project @ 2002-09-26 09:16:33 by simonpj]
Comments

21 years ago[project @ 2002-09-25 23:06:30 by ross]
ross [Wed, 25 Sep 2002 23:06:30 +0000 (23:06 +0000)]
[project @ 2002-09-25 23:06:30 by ross]
(Hugs only) use StorableArray as a poor man's IOUArray.

21 years ago[project @ 2002-09-25 23:01:11 by ross]
ross [Wed, 25 Sep 2002 23:01:11 +0000 (23:01 +0000)]
[project @ 2002-09-25 23:01:11 by ross]
(Hugs only) conform to the current FFI spec.  This code makes the
additional assumption that a finalizer added with addForeignPtrFinalizer
runs before any existing finalizers on the same object.

21 years ago[project @ 2002-09-25 22:55:41 by ross]
ross [Wed, 25 Sep 2002 22:55:41 +0000 (22:55 +0000)]
[project @ 2002-09-25 22:55:41 by ross]
Switch to mallocForeignPtr.

21 years ago[project @ 2002-09-25 22:49:17 by ross]
ross [Wed, 25 Sep 2002 22:49:17 +0000 (22:49 +0000)]
[project @ 2002-09-25 22:49:17 by ross]
Hugs only (but being considered for the ffi spec): added finalizerFree,
a pointer to a foreign function equivalent to free, for use as a finalizer.

21 years ago[project @ 2002-09-25 15:24:07 by simonmar]
simonmar [Wed, 25 Sep 2002 15:24:07 +0000 (15:24 +0000)]
[project @ 2002-09-25 15:24:07 by simonmar]
Re-instate the checking for the values of errno constants at configure
time.  The problem with doing it using foreign calls is simply that
this tickles a bad case in the code gen machinery, which in this case
results in an extra 10-20k of goop ending up in pretty much every
binary, and it impacts GC performance too.

This has some portability implications, but the situation is no worse
than before.  To reliably cross-compile for a new platform you need to
build a set of .hc files for the libraries using a config.h generated on
the *target* machine.  (at some point we'll formalise the
cross-compilation story, but that's another thing on the todo list...)

21 years ago[project @ 2002-09-25 15:16:30 by simonpj]
simonpj [Wed, 25 Sep 2002 15:16:30 +0000 (15:16 +0000)]
[project @ 2002-09-25 15:16:30 by simonpj]
Remove readList__

21 years ago[project @ 2002-09-24 19:01:55 by sof]
sof [Tue, 24 Sep 2002 19:01:55 +0000 (19:01 +0000)]
[project @ 2002-09-24 19:01:55 by sof]
userErrors: don't barf on non-IOExceptions.

Merge to STABLE.

21 years ago[project @ 2002-09-24 16:07:50 by sof]
sof [Tue, 24 Sep 2002 16:07:50 +0000 (16:07 +0000)]
[project @ 2002-09-24 16:07:50 by sof]
ioeGetErrorType(error case): don't pose as ioeGetHandle.

Merge to STABLE.

21 years ago[project @ 2002-09-23 09:19:53 by ross]
ross [Mon, 23 Sep 2002 09:19:53 +0000 (09:19 +0000)]
[project @ 2002-09-23 09:19:53 by ross]
remove unnecessary #ifndef __HUGS__

21 years ago[project @ 2002-09-20 13:15:07 by ross]
ross [Fri, 20 Sep 2002 13:15:07 +0000 (13:15 +0000)]
[project @ 2002-09-20 13:15:07 by ross]
Make Data.Array.Base more portable (no semantic changes, I hope) by

* replacing neat pattern guards with clunky case's

* putting #ifdef __GLASGOW_HASKELL__ around the unboxed stuff

* aliasing GHC.Arr

Note that the reliance on RULES for specialization of general definitions,
rather than a class for e.g. the unsafe freeze/thaw things, means that
other implementations can't specialize them with efficient versions.

21 years ago[project @ 2002-09-19 13:24:52 by simonmar]
simonmar [Thu, 19 Sep 2002 13:24:52 +0000 (13:24 +0000)]
[project @ 2002-09-19 13:24:52 by simonmar]
Put this below the Prelude in the dependency tree.  I accidentally
created a loop with the latest change to Foreign.hs; this fixes it.

21 years ago[project @ 2002-09-19 10:47:21 by simonmar]
simonmar [Thu, 19 Sep 2002 10:47:21 +0000 (10:47 +0000)]
[project @ 2002-09-19 10:47:21 by simonmar]
re-export unsafePerformIO

21 years ago[project @ 2002-09-18 11:32:43 by simonmar]
simonmar [Wed, 18 Sep 2002 11:32:44 +0000 (11:32 +0000)]
[project @ 2002-09-18 11:32:43 by simonmar]
Sort out the divide-by-zero situation.

Some integer division operations called error on a divide by zero, and
some didn't test for it.  Now we always raise the DivideByZero
exception.

MERGE TO STABLE

21 years ago[project @ 2002-09-16 11:29:39 by ross]
ross [Mon, 16 Sep 2002 11:29:39 +0000 (11:29 +0000)]
[project @ 2002-09-16 11:29:39 by ross]
Moved some stuff from Hugs.Prelude to Hugs.Char.

21 years ago[project @ 2002-09-16 11:24:36 by simonpj]
simonpj [Mon, 16 Sep 2002 11:24:36 +0000 (11:24 +0000)]
[project @ 2002-09-16 11:24:36 by simonpj]
Fix bug in Read instance for Maybe

21 years ago[project @ 2002-09-16 11:24:20 by simonpj]
simonpj [Mon, 16 Sep 2002 11:24:20 +0000 (11:24 +0000)]
[project @ 2002-09-16 11:24:20 by simonpj]
Comments only

21 years ago[project @ 2002-09-14 09:27:21 by panne]
panne [Sat, 14 Sep 2002 09:27:21 +0000 (09:27 +0000)]
[project @ 2002-09-14 09:27:21 by panne]
Make Haddock happy

21 years ago[project @ 2002-09-13 18:25:07 by panne]
panne [Fri, 13 Sep 2002 18:25:07 +0000 (18:25 +0000)]
[project @ 2002-09-13 18:25:07 by panne]
Not quite sure about this one: Export builtin stuff like [], (), and
(->) only for NHC, not for GHC anymore.

21 years ago[project @ 2002-09-13 18:21:46 by panne]
panne [Fri, 13 Sep 2002 18:21:46 +0000 (18:21 +0000)]
[project @ 2002-09-13 18:21:46 by panne]
It looks like we need assert again...?!

21 years ago[project @ 2002-09-11 11:06:05 by simonpj]
simonpj [Wed, 11 Sep 2002 11:06:05 +0000 (11:06 +0000)]
[project @ 2002-09-11 11:06:05 by simonpj]
Add documentation about unsafePerformIO

21 years ago[project @ 2002-09-10 20:45:50 by panne]
panne [Tue, 10 Sep 2002 20:45:50 +0000 (20:45 +0000)]
[project @ 2002-09-10 20:45:50 by panne]
Fixed slashification in Haddock comment

21 years ago[project @ 2002-09-10 11:36:04 by ross]
ross [Tue, 10 Sep 2002 11:36:04 +0000 (11:36 +0000)]
[project @ 2002-09-10 11:36:04 by ross]
non-GHC: import Control.Monad (needed by INSTANCE_STORABLE).

21 years ago[project @ 2002-09-10 11:07:23 by ross]
ross [Tue, 10 Sep 2002 11:07:23 +0000 (11:07 +0000)]
[project @ 2002-09-10 11:07:23 by ross]
#ifdef's for Hugs, which only allows one import in the Prelude at the moment.

21 years ago[project @ 2002-09-10 10:50:28 by malcolm]
malcolm [Tue, 10 Sep 2002 10:50:28 +0000 (10:50 +0000)]
[project @ 2002-09-10 10:50:28 by malcolm]
Export the builtin syntax for []((:),[]), ()(()), and (->) in nhc98
as well as ghc.

21 years ago[project @ 2002-09-10 09:13:52 by ross]
ross [Tue, 10 Sep 2002 09:13:52 +0000 (09:13 +0000)]
[project @ 2002-09-10 09:13:52 by ross]
H98 conformance: fill out (..)'s, and make the [] export GHC-only.

21 years ago[project @ 2002-09-10 09:06:07 by simonmar]
simonmar [Tue, 10 Sep 2002 09:06:07 +0000 (09:06 +0000)]
[project @ 2002-09-10 09:06:07 by simonmar]
Remove CBlkCnt and add it to the ToDo list; it clearly isn't present
on several systems yet.  Fortunately we weren't using it.

21 years ago[project @ 2002-09-09 16:04:10 by ross]
ross [Mon, 9 Sep 2002 16:04:10 +0000 (16:04 +0000)]
[project @ 2002-09-09 16:04:10 by ross]
More imports for non-GHC platforms.

21 years ago[project @ 2002-09-09 15:30:58 by ross]
ross [Mon, 9 Sep 2002 15:30:58 +0000 (15:30 +0000)]
[project @ 2002-09-09 15:30:58 by ross]
Hugs-only changes: explicit imports + use approxRational.

21 years ago[project @ 2002-09-09 15:13:47 by simonmar]
simonmar [Mon, 9 Sep 2002 15:13:47 +0000 (15:13 +0000)]
[project @ 2002-09-09 15:13:47 by simonmar]
Comments only

21 years ago[project @ 2002-09-09 03:50:38 by sof]
sof [Mon, 9 Sep 2002 03:50:39 +0000 (03:50 +0000)]
[project @ 2002-09-09 03:50:38 by sof]
(hugs only): PrelImpl -> Hugs.Prelude

21 years ago[project @ 2002-09-08 02:35:33 by sof]
sof [Sun, 8 Sep 2002 02:35:34 +0000 (02:35 +0000)]
[project @ 2002-09-08 02:35:33 by sof]
Hugs updates + fixes

21 years ago[project @ 2002-09-06 15:00:04 by simonmar]
simonmar [Fri, 6 Sep 2002 15:00:04 +0000 (15:00 +0000)]
[project @ 2002-09-06 15:00:04 by simonmar]
Disable the whole contents on mingw32.  At some point we might be able
to provide cut-down signal support, but I'll leave that for later.

21 years ago[project @ 2002-09-06 14:38:15 by simonmar]
simonmar [Fri, 6 Sep 2002 14:38:15 +0000 (14:38 +0000)]
[project @ 2002-09-06 14:38:15 by simonmar]
Make it build on mingw32, with a cut-down set of types

21 years ago[project @ 2002-09-06 14:34:15 by simonmar]
simonmar [Fri, 6 Sep 2002 14:34:15 +0000 (14:34 +0000)]
[project @ 2002-09-06 14:34:15 by simonmar]
Partial rewrite of the POSIX library.

The main purpose of this sweep is to remove the last dependencies of
the compiler on hslibs.  When I've committed the associated compiler
changes, only the 'base' package will be required to bootstrap the
compiler.  Additionally to build GHCi, the 'readline' and 'unix'
packages will be required.

The new POSIX library lives mostly in libraries/unix, with a few bits
required for compiler bootstrapping in libraries/base.  The 'base'
package is mostly free of hsc2hs code to make bootstrapping from HC
files easier, but the 'unix' package will use hsc2hs liberally.

The old POSIX library continues to provide more-or-less the same
interface as before, although some of the types are more correct now
(previously lots of POSIX types were just mapped to Int).  The new
interface is largely the same as the old, except that some new
functionality from the latest POSIX spec has been added (eg. symbolic
links).

So far, the new POSIX library has signal support, directory/file
operations and lots of stuff from unistd.h.  The module names are:

  System.Posix
The main dude, exports everything

  System.Posix.Types
All the POSIX types, using the same naming scheme as
        Foreign.C.Types, Eg. CUid, COff, etc.  Many of these types
        were previously exported by GHC.Posix.

        Additionally exports the "nicer" names used by the old POSIX
library for compatibility (eg. ProcessID == CPid, FileMode ==
CMode, etc.)

All reasonable instances are derived for these types.

  System.Posix.Signals
Signal support, contains most of which was in PosixProcPrim before.
The RTS interface to the signal handling support has been
rationalised slightly.

  System.Posix.Directory
  Directory support, most were in PosixFiles before.

  System.Posix.Files
File operations, most were in PosixFiles before.

  System.Posix.Unistd
(for want of a better name) Miscellaneous bits that mostly come
from the unistd.h header file.  PosixProcEnv before.

The rest of the library should pan out like so:

  System.Posix.IO
  System.Posix.Error   (maybe)
  System.Posix.Process
  System.Posix.Terminal

(I've no doubt broken Win32 support, but I'm checking the build at the moment).

21 years ago[project @ 2002-09-06 14:08:45 by simonmar]
simonmar [Fri, 6 Sep 2002 14:08:45 +0000 (14:08 +0000)]
[project @ 2002-09-06 14:08:45 by simonmar]
Implement

   mallocForeignPtr :: Storable a => IO (ForeignPtr a)
   mallocForeignPtrBytes :: Int -> IO (ForeignPtr a)

as GHC extensions for the time being.  I strongly recommend using
these if you need some garbage-collected memory to pass to a foreign
function.

21 years ago[project @ 2002-09-04 16:51:33 by ross]
ross [Wed, 4 Sep 2002 16:51:34 +0000 (16:51 +0000)]
[project @ 2002-09-04 16:51:33 by ross]
Foreign.C.TypesISO needs to import Foreign.Storable.
Also added some imports for non-GHC platforms.

21 years ago[project @ 2002-09-04 16:46:40 by ross]
ross [Wed, 4 Sep 2002 16:46:40 +0000 (16:46 +0000)]
[project @ 2002-09-04 16:46:40 by ross]
Fix typo.

21 years ago[project @ 2002-09-04 16:05:29 by simonmar]
simonmar [Wed, 4 Sep 2002 16:05:30 +0000 (16:05 +0000)]
[project @ 2002-09-04 16:05:29 by simonmar]
GHC can derive arbitrary instances for newtypes, so derive Storable
for the types in Foreign.C.Types, rather than using CPP trickery to
define the instances.

This moves the Storable instances for the C Types from
Foreign.Storable into Foreign.C.Types, and hence a few imports have
changed around.

21 years ago[project @ 2002-09-04 15:52:20 by simonmar]
simonmar [Wed, 4 Sep 2002 15:52:20 +0000 (15:52 +0000)]
[project @ 2002-09-04 15:52:20 by simonmar]
Remove some unnecessary imports

21 years ago[project @ 2002-09-03 09:40:51 by simonmar]
simonmar [Tue, 3 Sep 2002 09:40:51 +0000 (09:40 +0000)]
[project @ 2002-09-03 09:40:51 by simonmar]
(%) should be infixl 7 (thanks to Jon Fairbairn for pointing out the omission)

MERGE TO STABLE

21 years ago[project @ 2002-09-03 00:15:45 by mthomas]
mthomas [Tue, 3 Sep 2002 00:15:45 +0000 (00:15 +0000)]
[project @ 2002-09-03 00:15:45 by mthomas]
Mingw32 has no fcntl() - use _setmode() (twice) instead.

21 years ago[project @ 2002-09-02 16:40:55 by simonpj]
simonpj [Mon, 2 Sep 2002 16:40:55 +0000 (16:40 +0000)]
[project @ 2002-09-02 16:40:55 by simonpj]
Un-break head build due to (:) export

21 years ago[project @ 2002-09-02 16:33:31 by ross]
ross [Mon, 2 Sep 2002 16:33:31 +0000 (16:33 +0000)]
[project @ 2002-09-02 16:33:31 by ross]
non-GHC compilers should also import Numeric.

21 years ago[project @ 2002-09-02 11:20:50 by ross]
ross [Mon, 2 Sep 2002 11:20:50 +0000 (11:20 +0000)]
[project @ 2002-09-02 11:20:50 by ross]
Minor rearrangement: the implementation of System.Exit.exitWith is
GHC-specific, while exitFailure is portable.

21 years ago[project @ 2002-08-31 08:37:56 by simonpj]
simonpj [Sat, 31 Aug 2002 08:37:56 +0000 (08:37 +0000)]
[project @ 2002-08-31 08:37:56 by simonpj]
Remove GHC.Base.assert until I can figure out what happened

21 years ago[project @ 2002-08-30 14:54:58 by simonpj]
simonpj [Fri, 30 Aug 2002 14:54:58 +0000 (14:54 +0000)]
[project @ 2002-08-30 14:54:58 by simonpj]
Move defn of hs_fileno inside ifdef

21 years ago[project @ 2002-08-30 14:29:51 by simonpj]
simonpj [Fri, 30 Aug 2002 14:29:52 +0000 (14:29 +0000)]
[project @ 2002-08-30 14:29:51 by simonpj]
* Do not export built-in syntax (H98 conformance)
* Add 'assert' to GHC.Base

(no need to merge to stable branch)

21 years ago[project @ 2002-08-30 14:19:18 by simonpj]
simonpj [Fri, 30 Aug 2002 14:19:18 +0000 (14:19 +0000)]
[project @ 2002-08-30 14:19:18 by simonpj]
Extra space after $ to avoid conflict with Template Haskell

21 years ago[project @ 2002-08-30 13:43:57 by stolz]
stolz [Fri, 30 Aug 2002 13:43:57 +0000 (13:43 +0000)]
[project @ 2002-08-30 13:43:57 by stolz]
Haddock-ise with comments from library report

21 years ago[project @ 2002-08-30 13:27:42 by stolz]
stolz [Fri, 30 Aug 2002 13:27:42 +0000 (13:27 +0000)]
[project @ 2002-08-30 13:27:42 by stolz]
Haddock-ise.

21 years ago[project @ 2002-08-30 13:00:31 by simonpj]
simonpj [Fri, 30 Aug 2002 13:00:31 +0000 (13:00 +0000)]
[project @ 2002-08-30 13:00:31 by simonpj]
Remove bogus parError; MERGE TO STABLE

21 years ago[project @ 2002-08-30 12:32:44 by stolz]
stolz [Fri, 30 Aug 2002 12:32:44 +0000 (12:32 +0000)]
[project @ 2002-08-30 12:32:44 by stolz]
- Haddock-ise with comments from library report
- FIXME: Haddock doesn't support nested enumerations.

21 years ago[project @ 2002-08-30 12:25:15 by stolz]
stolz [Fri, 30 Aug 2002 12:25:15 +0000 (12:25 +0000)]
[project @ 2002-08-30 12:25:15 by stolz]
Express 'killThread' in terms of 'throwTo'

21 years ago[project @ 2002-08-30 10:46:10 by stolz]
stolz [Fri, 30 Aug 2002 10:46:10 +0000 (10:46 +0000)]
[project @ 2002-08-30 10:46:10 by stolz]
Haddock-ised. The previous version already did contain a lot of
documentation which just wasn't in the right shape. The
current documentation diverges slightly from the Library Report.

21 years ago[project @ 2002-08-30 07:56:48 by stolz]
stolz [Fri, 30 Aug 2002 07:56:48 +0000 (07:56 +0000)]
[project @ 2002-08-30 07:56:48 by stolz]
Fix sample way of expressing 'killThread' in docs.

From: Dean Herington <heringto@cs.unc.edu>

PLEASE MERGE

21 years ago[project @ 2002-08-29 16:39:42 by stolz]
stolz [Thu, 29 Aug 2002 16:39:42 +0000 (16:39 +0000)]
[project @ 2002-08-29 16:39:42 by stolz]
- Haddock-ise with comments from library report
- The chapter "Deriving Instances of Ix" doesn't end up in the "Contents"
    section (yet), although it should.

21 years ago[project @ 2002-08-29 16:05:59 by stolz]
stolz [Thu, 29 Aug 2002 16:05:59 +0000 (16:05 +0000)]
[project @ 2002-08-29 16:05:59 by stolz]
Haddock-ise with comments from library report

21 years ago[project @ 2002-08-29 16:03:57 by stolz]
stolz [Thu, 29 Aug 2002 16:03:57 +0000 (16:03 +0000)]
[project @ 2002-08-29 16:03:57 by stolz]
Add replicateM[_] and foldM_

21 years ago[project @ 2002-08-29 11:49:10 by simonmar]
simonmar [Thu, 29 Aug 2002 11:49:11 +0000 (11:49 +0000)]
[project @ 2002-08-29 11:49:10 by simonmar]
Make the readline binding into a hierarchical library and put it in
its own package (for licensing reasons).

As part of this, I moved fdToHandle from PosixIO into GHC.Handle (and
updated the code to avoid using _casm_) since Readline requires it.

I've also updated Readline to use the latest FFI syntax.

21 years ago[project @ 2002-08-29 11:29:40 by simonmar]
simonmar [Thu, 29 Aug 2002 11:29:40 +0000 (11:29 +0000)]
[project @ 2002-08-29 11:29:40 by simonmar]
Foreign.C.TypesISO has been merged into Foreign.C.Types now.

21 years ago[project @ 2002-08-29 09:24:21 by simonmar]
simonmar [Thu, 29 Aug 2002 09:24:22 +0000 (09:24 +0000)]
[project @ 2002-08-29 09:24:21 by simonmar]
Move library-project documentation to a better place, and add the
current hierarchy spec.

21 years ago[project @ 2002-08-29 05:11:41 by ross]
ross [Thu, 29 Aug 2002 05:11:41 +0000 (05:11 +0000)]
[project @ 2002-08-29 05:11:41 by ross]
The functions rawSystem, withArgs and withProgName aren't supported
by Hugs yet.

21 years ago[project @ 2002-08-28 14:30:12 by simonpj]
simonpj [Wed, 28 Aug 2002 14:30:12 +0000 (14:30 +0000)]
[project @ 2002-08-28 14:30:12 by simonpj]
Fix a lexing bug: "\SOH" could mean "\SO" followed by "H"
or "\SOH".  The Report specifies the latter.

MERGE TO STABLE

21 years ago[project @ 2002-08-28 13:59:19 by simonmar]
simonmar [Wed, 28 Aug 2002 13:59:19 +0000 (13:59 +0000)]
[project @ 2002-08-28 13:59:19 by simonmar]
- Move rawSystem from SystemExts to System.Cmd.
- Move withArgv and withProgName from SystemExts to System.Environment

These functions are still exported by SystemExts for compatibility.

21 years ago[project @ 2002-08-27 14:44:31 by simonmar]
simonmar [Tue, 27 Aug 2002 14:44:31 +0000 (14:44 +0000)]
[project @ 2002-08-27 14:44:31 by simonmar]
We really should export the representations of Ptr and FunPtr from here.

21 years ago[project @ 2002-08-25 09:16:07 by panne]
panne [Sun, 25 Aug 2002 09:16:07 +0000 (09:16 +0000)]
[project @ 2002-08-25 09:16:07 by panne]
Fixed bug in documentation introduced by "Mr. Haddock" himself. :-)

21 years ago[project @ 2002-08-23 22:10:43 by sof]
sof [Fri, 23 Aug 2002 22:10:43 +0000 (22:10 +0000)]
[project @ 2002-08-23 22:10:43 by sof]
ioeGetErrorString: don't "show" the string from a user error.

Merge to STABLE.

21 years ago[project @ 2002-08-21 10:43:22 by simonmar]
simonmar [Wed, 21 Aug 2002 10:43:22 +0000 (10:43 +0000)]
[project @ 2002-08-21 10:43:22 by simonmar]
Oops, unpackCStringUtf8# had rotted at some point, and no-one noticed.
Some parentheses are required because the relative precedences of
uncheckIShiftL# and +# (the default precedences, AFAICT) give the
wrong meaning to some expressions.

MERGE TO STABLE

21 years ago[project @ 2002-08-20 10:03:05 by simonmar]
simonmar [Tue, 20 Aug 2002 10:03:05 +0000 (10:03 +0000)]
[project @ 2002-08-20 10:03:05 by simonmar]
The Typeable instances were missing in the __GLASGOW_HASKELL__ case;
add them.

21 years ago[project @ 2002-08-16 11:38:57 by simonmar]
simonmar [Fri, 16 Aug 2002 11:38:57 +0000 (11:38 +0000)]
[project @ 2002-08-16 11:38:57 by simonmar]
Some extra docs for addFinalizer, describing why using addFinalizer on
a ForeignPtr isn't the same as using addForeignPtrFinalizer.

21 years ago[project @ 2002-08-16 11:38:04 by simonmar]
simonmar [Fri, 16 Aug 2002 11:38:04 +0000 (11:38 +0000)]
[project @ 2002-08-16 11:38:04 by simonmar]
Data.Array.IArray should export Array too

21 years ago[project @ 2002-08-08 22:29:28 by reid]
reid [Thu, 8 Aug 2002 22:29:28 +0000 (22:29 +0000)]
[project @ 2002-08-08 22:29:28 by reid]
Hugs provides makeForeignPtr instead of newForeignPtr.

It is hoped that these macros overcome the difference.

+ #ifdef __HUGS__
+ #define MAKE_ARRAY(x) makeForeignPtr (x) free
+ #else
+ #define MAKE_ARRAY(x) newForeignPtr (x) (free (x))
+ #endif

I could probably get away with introducing a Haskell functions instead
of a macro..

[Untested since Data.Array.Base requires the pattern guard extension
so I can't load it.  Still, I think this will be ready to go once we
fix D.A.B]

21 years ago[project @ 2002-08-08 06:25:05 by ross]
ross [Thu, 8 Aug 2002 06:25:05 +0000 (06:25 +0000)]
[project @ 2002-08-08 06:25:05 by ross]
Add hTell to Hugs.

21 years ago[project @ 2002-08-07 12:17:59 by ross]
ross [Wed, 7 Aug 2002 12:17:59 +0000 (12:17 +0000)]
[project @ 2002-08-07 12:17:59 by ross]
Renamed HugsStorable -> Hugs.Storable (copy of lib/exts/HugsStorable.hs)

21 years ago[project @ 2002-08-05 08:48:07 by simonmar]
simonmar [Mon, 5 Aug 2002 08:48:08 +0000 (08:48 +0000)]
[project @ 2002-08-05 08:48:07 by simonmar]
Remove the literate bits from this file: I'm trying to keep .lhs out
of the non-GHC parts of the libraries tree, we don't use it any more
and it clutters up the code.

21 years ago[project @ 2002-08-05 08:44:53 by simonmar]
simonmar [Mon, 5 Aug 2002 08:44:53 +0000 (08:44 +0000)]
[project @ 2002-08-05 08:44:53 by simonmar]
Move the import of System.IO.Unsafe into the #else part of #ifdef
__GLASGOW_HASKELL__, because it was causing an import loop.
(Alastair: that #else should probably be #elif __HUGS__, right?)

21 years ago[project @ 2002-08-05 08:29:17 by simonmar]
simonmar [Mon, 5 Aug 2002 08:29:17 +0000 (08:29 +0000)]
[project @ 2002-08-05 08:29:17 by simonmar]
Add missing GHC imports

21 years ago[project @ 2002-08-03 21:33:15 by reid]
reid [Sat, 3 Aug 2002 21:33:15 +0000 (21:33 +0000)]
[project @ 2002-08-03 21:33:15 by reid]
Directives like this

   {-# OPTIONS -#include "HsBase.h" #-}

aren't portable so I added this:

   foreign import ccall unsafe "HsBase.h ghcErrno" _errno :: Ptr CInt
                                ^^^^^^^^
                                ^^^^^^^^
                                ^^^^^^^^

21 years ago[project @ 2002-08-03 21:01:26 by reid]
reid [Sat, 3 Aug 2002 21:01:26 +0000 (21:01 +0000)]
[project @ 2002-08-03 21:01:26 by reid]
Final bout of changes to make things work with Hugs.

- I'd forgotten to include MachDep.h to the SIZEOF_* and ALIGNMENT_*
  macros (breaking GHC as well)
- I'd missed the use of one of GHC's type extensions.

21 years ago[project @ 2002-08-03 20:14:23 by reid]
reid [Sat, 3 Aug 2002 20:14:24 +0000 (20:14 +0000)]
[project @ 2002-08-03 20:14:23 by reid]
oops again