ghc-base.git
15 years agoIn nhc98, Word is a type synonym, so class instance is not possible. 6_10_branch_has_been_forked
Malcolm.Wallace@cs.york.ac.uk [Wed, 17 Sep 2008 07:53:26 +0000 (07:53 +0000)]
In nhc98, Word is a type synonym, so class instance is not possible.

15 years agoFix bugs in Text.Printf (#1548)
Simon Marlow [Tue, 16 Sep 2008 13:35:05 +0000 (13:35 +0000)]
Fix bugs in Text.Printf (#1548)

15 years agoWe should be including Rts.h here, not Stg.h
Simon Marlow [Fri, 12 Sep 2008 13:49:01 +0000 (13:49 +0000)]
We should be including Rts.h here, not Stg.h
Stg.h is for .hc files only, and it sets up various global register
variables.

15 years agoGeneric functions that take integral arguments should work the same way as their...
<unknown> [Fri, 22 Aug 2008 02:27:55 +0000 (02:27 +0000)]
Generic functions that take integral arguments should work the same way as their prelude counterparts

The Prelude functions drop, take, and splitAt are unfailing (never call error). This patch changes the Data.List generic versions to behave the same way. At present, they call error on negative arguments.

15 years agoDon't define __hscore_s_issock on Windows
Ian Lynagh [Thu, 4 Sep 2008 20:28:45 +0000 (20:28 +0000)]
Don't define __hscore_s_issock on Windows

15 years agoUnbreak the GHC build with older versions of gcc
Ian Lynagh [Thu, 4 Sep 2008 18:51:22 +0000 (18:51 +0000)]
Unbreak the GHC build with older versions of gcc
Patch from kili@outback.escape.de, who says:
  Stg.h must be included before HsBase.h, because the latter contains
  function definitions causing older versions of gcc (3.3.5 in my
  case) to bail out with "error: global register variable follows a
  function definition" on Regs.h, which is included by Stg.h.

15 years agoDon't make S_ISSOCK use conditional
Ian Lynagh [Thu, 4 Sep 2008 16:42:34 +0000 (16:42 +0000)]
Don't make S_ISSOCK use conditional
We were conditionally defining the C wrapper, but unconditionally using
it. So if it didn't exist then things would have broken anyway.

15 years agoAdd missing files
Ian Lynagh [Thu, 4 Sep 2008 10:09:51 +0000 (10:09 +0000)]
Add missing files

15 years agoRemerge concurrent,unique,timeout,st,getopt into base
Ian Lynagh [Wed, 3 Sep 2008 20:19:08 +0000 (20:19 +0000)]
Remerge concurrent,unique,timeout,st,getopt into base

15 years agoremove 'pure' method from Arrow class (#2517)
Ross Paterson [Wed, 3 Sep 2008 14:44:36 +0000 (14:44 +0000)]
remove 'pure' method from Arrow class (#2517)

15 years agomake Typeable instances for larger tuples available to non-GHC
Ross Paterson [Wed, 3 Sep 2008 11:35:43 +0000 (11:35 +0000)]
make Typeable instances for larger tuples available to non-GHC

15 years agoDon't look for actual OldException.Exception exceptions
Ian Lynagh [Tue, 2 Sep 2008 22:47:30 +0000 (22:47 +0000)]
Don't look for actual OldException.Exception exceptions
We don't actually throw them (we throw the new Exception equivalents
instead), and looking for them was causing an infinite loop

15 years agoadd include/CTypes.h to extra-source-files
Ross Paterson [Tue, 2 Sep 2008 15:30:29 +0000 (15:30 +0000)]
add include/CTypes.h to extra-source-files

15 years agoavoid relying on the implementation of SomeException
Ross Paterson [Tue, 2 Sep 2008 08:01:13 +0000 (08:01 +0000)]
avoid relying on the implementation of SomeException

This is because Hugs uses a different implementation.
No semantic change.

15 years agonon-GHC: leave out Belch functions
Ross Paterson [Sun, 31 Aug 2008 18:02:27 +0000 (18:02 +0000)]
non-GHC: leave out Belch functions

15 years agonon-GHC: add Typeable instance for ForeignPtr
Ross Paterson [Sun, 31 Aug 2008 18:00:48 +0000 (18:00 +0000)]
non-GHC: add Typeable instance for ForeignPtr

15 years agodocs: mention that killThread on a completed thread is a no-op
Simon Marlow [Tue, 2 Sep 2008 09:31:26 +0000 (09:31 +0000)]
docs: mention that killThread on a completed thread is a no-op

15 years ago#2528: reverse the order of args to (==) in nubBy to match nub
Simon Marlow [Tue, 2 Sep 2008 09:29:50 +0000 (09:29 +0000)]
#2528: reverse the order of args to (==) in nubBy to match nub
This only makes a difference when the (==) definition is not
reflexive, but strictly speaking it does violate the report definition
of nubBy, so we should fix it.

15 years agoSystem.Timeout is no longer part of base
Malcolm.Wallace@cs.york.ac.uk [Mon, 1 Sep 2008 14:57:38 +0000 (14:57 +0000)]
System.Timeout is no longer part of base

15 years agogetopt is no longer part of base
Malcolm.Wallace@cs.york.ac.uk [Wed, 27 Aug 2008 14:53:36 +0000 (14:53 +0000)]
getopt is no longer part of base

15 years agoSplit syb off into its own package
Ian Lynagh [Mon, 25 Aug 2008 21:41:44 +0000 (21:41 +0000)]
Split syb off into its own package
I've also moved the Data (Complex a) instance into it, and made it
portable rather than GHC-only in the process.

15 years agoadd extra-source-files field
Ross Paterson [Mon, 25 Aug 2008 23:13:17 +0000 (23:13 +0000)]
add extra-source-files field

15 years agoFix warnings in PrelIOUtils.c
Ian Lynagh [Mon, 25 Aug 2008 14:18:41 +0000 (14:18 +0000)]
Fix warnings in PrelIOUtils.c

15 years agoWindows-only fixes for moving concurrent out of base
Ian Lynagh [Sun, 24 Aug 2008 16:41:46 +0000 (16:41 +0000)]
Windows-only fixes for moving concurrent out of base

15 years agoSplit off the concurrent hierarchy (concurrent, unique, timeout)
Ian Lynagh [Sun, 24 Aug 2008 12:39:56 +0000 (12:39 +0000)]
Split off the concurrent hierarchy (concurrent, unique, timeout)

15 years agoSplit getopt off into its own package
Ian Lynagh [Sun, 24 Aug 2008 02:02:13 +0000 (02:02 +0000)]
Split getopt off into its own package

15 years agoRemove ST stuff that is now in the new st package
Ian Lynagh [Sat, 23 Aug 2008 22:30:14 +0000 (22:30 +0000)]
Remove ST stuff that is now in the new st package

15 years agoFix Windows-only warnings
Ian Lynagh [Sat, 23 Aug 2008 00:22:49 +0000 (00:22 +0000)]
Fix Windows-only warnings

15 years agoFix Windows-only warnings in GHC.Conc
Ian Lynagh [Fri, 22 Aug 2008 23:48:37 +0000 (23:48 +0000)]
Fix Windows-only warnings in GHC.Conc

15 years agoSuppress some warnings that are hard to fix because of ifdefs
Ian Lynagh [Fri, 22 Aug 2008 23:39:51 +0000 (23:39 +0000)]
Suppress some warnings that are hard to fix because of ifdefs

15 years agoProvide blockedOnDeadMVar, blockedIndefinitely for the RTS
Ian Lynagh [Thu, 21 Aug 2008 11:07:23 +0000 (11:07 +0000)]
Provide blockedOnDeadMVar, blockedIndefinitely for the RTS

15 years agoFix more warnings
Ian Lynagh [Wed, 20 Aug 2008 23:39:58 +0000 (23:39 +0000)]
Fix more warnings

15 years agoSuppress a couple of warnings in GHC.PArr
Ian Lynagh [Wed, 20 Aug 2008 23:20:18 +0000 (23:20 +0000)]
Suppress a couple of warnings in GHC.PArr
The fix isn't immediately obvious to me

15 years agoFix more warnings
Ian Lynagh [Wed, 20 Aug 2008 23:19:37 +0000 (23:19 +0000)]
Fix more warnings

15 years agoFix warnings in Data.Generics.*
Ian Lynagh [Wed, 20 Aug 2008 23:04:37 +0000 (23:04 +0000)]
Fix warnings in Data.Generics.*

15 years agoFix some more warnings
Ian Lynagh [Wed, 20 Aug 2008 22:32:52 +0000 (22:32 +0000)]
Fix some more warnings

15 years agoIgnore some orphan warnings
Ian Lynagh [Wed, 20 Aug 2008 21:19:01 +0000 (21:19 +0000)]
Ignore some orphan warnings

15 years agoremove some functions that aren't used in base
Simon Marlow [Thu, 21 Aug 2008 14:23:39 +0000 (14:23 +0000)]
remove some functions that aren't used in base

15 years agoremove __hscore_renameFile, it is no longer uesd
Simon Marlow [Mon, 18 Aug 2008 15:59:50 +0000 (15:59 +0000)]
remove __hscore_renameFile, it is no longer uesd
System.Directory implements renameFile using unix/Win32 now.

15 years agoRewrite the documentation for forkOS again
Simon Marlow [Mon, 18 Aug 2008 13:28:56 +0000 (13:28 +0000)]
Rewrite the documentation for forkOS again
Try to make it clearer that forkOS is only necessary when calling
foreing libraries that use thread-local state, and it has nothing to
do with scheduling behaviour between Haskell threads.  I also added
something about the performance impact of forkOS, and mentioned that
the main thread is a bound thread.

15 years agonhc only: expose Foldable and Traversable instances of Array
Ross Paterson [Sun, 17 Aug 2008 00:27:19 +0000 (00:27 +0000)]
nhc only: expose Foldable and Traversable instances of Array

These were turned off as a side-effect of a previous nhc-only fix for
#2176 that is no longer needed.  They should be fine for nhc now.

15 years agoFix hReady (trac #1063)
Ian Lynagh [Sat, 16 Aug 2008 18:27:15 +0000 (18:27 +0000)]
Fix hReady (trac #1063)
We now throw an EOF exception when appropriate

15 years agoFix oversight in Control.OldException
Bertram Felgenhauer [Sat, 16 Aug 2008 13:26:31 +0000 (13:26 +0000)]
Fix oversight in Control.OldException
The NonTermination constructor slipped through in the Exception instance.

15 years agoEliminate orphan rules and instances in the array package
Ian Lynagh [Sat, 16 Aug 2008 12:22:53 +0000 (12:22 +0000)]
Eliminate orphan rules and instances in the array package

15 years agoControl.OldException: Map exceptions to old exceptions and back properly.
Ian Lynagh [Thu, 14 Aug 2008 21:02:19 +0000 (21:02 +0000)]
Control.OldException: Map exceptions to old exceptions and back properly.
  * Control.OldException: Map exceptions to old exceptions and back properly.

It's really necessary to map them back as well, or the RTS and base library
will not recognize exceptions that got caught and rethrown. (See #2508)

Patch from Bertram Felgenhauer <int-e@gmx.de>

15 years agoadd Traversable generalizations of mapAccumL and mapAccumR (#2461)
Ross Paterson [Thu, 14 Aug 2008 16:26:17 +0000 (16:26 +0000)]
add Traversable generalizations of mapAccumL and mapAccumR (#2461)

15 years agosimplify definition of Prelude.catch
Ross Paterson [Thu, 14 Aug 2008 14:36:50 +0000 (14:36 +0000)]
simplify definition of Prelude.catch

15 years agoremove returns from void functions
Ross Paterson [Thu, 14 Aug 2008 11:08:41 +0000 (11:08 +0000)]
remove returns from void functions

15 years agoNo reason for Handler and catches to exclude nhc98.
Malcolm.Wallace@cs.york.ac.uk [Wed, 13 Aug 2008 12:58:50 +0000 (12:58 +0000)]
No reason for Handler and catches to exclude nhc98.

15 years agoMust import ExitCode for its instance to be re-exported.
Malcolm.Wallace@cs.york.ac.uk [Wed, 13 Aug 2008 12:57:10 +0000 (12:57 +0000)]
Must import ExitCode for its instance to be re-exported.
The Cabal library depends on "instance Exception ExitCode", and expects
to import it from Control.Exception, not Control.Exception.Base.

15 years agouse New.catch instead of catchException in OldException
Ross Paterson [Wed, 13 Aug 2008 07:13:07 +0000 (07:13 +0000)]
use New.catch instead of catchException in OldException

15 years agouse the Haskell 98 module Control.Exception.Base in the Concurrent modules
Ross Paterson [Wed, 13 Aug 2008 00:02:19 +0000 (00:02 +0000)]
use the Haskell 98 module Control.Exception.Base in the Concurrent modules

15 years agoexport Control.Exception.Base
Ross Paterson [Tue, 12 Aug 2008 23:36:40 +0000 (23:36 +0000)]
export Control.Exception.Base

15 years agouse dummy implementation of timeout for all non-GHCs
Ross Paterson [Tue, 12 Aug 2008 15:16:02 +0000 (15:16 +0000)]
use dummy implementation of timeout for all non-GHCs

15 years agoHugs only: fix imports
Ross Paterson [Tue, 12 Aug 2008 14:56:54 +0000 (14:56 +0000)]
Hugs only: fix imports

15 years agonon-GHC: hide Prelude.catch
Ross Paterson [Tue, 12 Aug 2008 14:56:22 +0000 (14:56 +0000)]
non-GHC: hide Prelude.catch

15 years agoadd Control.Exception.Base to nhc98 build
Malcolm.Wallace@cs.york.ac.uk [Tue, 12 Aug 2008 17:43:00 +0000 (17:43 +0000)]
add Control.Exception.Base to nhc98 build

15 years agobump to version 4.0
Simon Marlow [Tue, 5 Aug 2008 15:33:54 +0000 (15:33 +0000)]
bump to version 4.0

15 years agoHugs only: don't import exception types -- their instances are now in Control.Excepti...
Ross Paterson [Tue, 12 Aug 2008 14:04:33 +0000 (14:04 +0000)]
Hugs only: don't import exception types -- their instances are now in Control.Exception.Base

15 years agosplit most of Control.Exception into new Control.Exception.Base
Ross Paterson [Tue, 12 Aug 2008 12:49:12 +0000 (12:49 +0000)]
split most of Control.Exception into new Control.Exception.Base

Move everything but catches/Handler into a new internal module.
This was needed to get the new exceptions working with Hugs, because Hugs
has the constraint that all Haskell 98 library modules, and everything
they include, must be Haskell 98.  This also involves a different
representation of SomeException for Hugs, so that type is exported
opaquely for Hugs.  Then Control.Exception.Base is Haskell 98 as far as
Hugs is concerned, but Control.Exception needs the extensions turned on.

Control.Exception re-exports everything from Control.Exception.Base
except the functions used by the GHC runtime.

15 years agoremove kludges, now that Control.Exception is imported
Ross Paterson [Mon, 11 Aug 2008 18:03:28 +0000 (18:03 +0000)]
remove kludges, now that Control.Exception is imported

15 years agothreadDelay and friends are GHC-only
Ross Paterson [Mon, 11 Aug 2008 17:50:39 +0000 (17:50 +0000)]
threadDelay and friends are GHC-only

15 years agofix imports for non-GHC
Malcolm.Wallace@cs.york.ac.uk [Fri, 8 Aug 2008 09:20:17 +0000 (09:20 +0000)]
fix imports for non-GHC

15 years agoEq and Ord have moved into GHC.Classes
Ian Lynagh [Thu, 7 Aug 2008 09:53:52 +0000 (09:53 +0000)]
Eq and Ord have moved into GHC.Classes

15 years agoUse the proper CInt type in GHC.Unicode
Ian Lynagh [Wed, 6 Aug 2008 23:29:48 +0000 (23:29 +0000)]
Use the proper CInt type in GHC.Unicode

15 years agoImport wibbles
Ian Lynagh [Wed, 6 Aug 2008 23:20:55 +0000 (23:20 +0000)]
Import wibbles

15 years agoRemove unnecessary Data/Dynamic.hs-boot
Ian Lynagh [Wed, 6 Aug 2008 23:06:23 +0000 (23:06 +0000)]
Remove unnecessary Data/Dynamic.hs-boot

15 years agoRemove more redundant GHC.Float imports
Ian Lynagh [Wed, 6 Aug 2008 22:54:11 +0000 (22:54 +0000)]
Remove more redundant GHC.Float imports

15 years agoRemove an unnecessary import
Ian Lynagh [Wed, 6 Aug 2008 22:47:42 +0000 (22:47 +0000)]
Remove an unnecessary import

15 years agoMove Int, Float and Double into ghc-prim:GHC.Types
Ian Lynagh [Wed, 6 Aug 2008 19:15:54 +0000 (19:15 +0000)]
Move Int, Float and Double into ghc-prim:GHC.Types

15 years agoPut some explicit import lists in Data.Typeable
Ian Lynagh [Wed, 6 Aug 2008 19:03:53 +0000 (19:03 +0000)]
Put some explicit import lists in Data.Typeable

15 years agoFix a couple of imports
Ian Lynagh [Wed, 6 Aug 2008 16:55:49 +0000 (16:55 +0000)]
Fix a couple of imports

15 years agoRemove unused conditional import
Ian Lynagh [Wed, 6 Aug 2008 12:49:30 +0000 (12:49 +0000)]
Remove unused conditional import

15 years agoSwap imports around to get GHC.ForeignPtr out of the base knot
Ian Lynagh [Wed, 6 Aug 2008 12:13:13 +0000 (12:13 +0000)]
Swap imports around to get GHC.ForeignPtr out of the base knot

15 years agoMove some bits around to stop Data.Either being in the base import knot
Ian Lynagh [Wed, 6 Aug 2008 12:05:04 +0000 (12:05 +0000)]
Move some bits around to stop Data.Either being in the base import knot

15 years agoTweak an import
Ian Lynagh [Wed, 6 Aug 2008 00:04:40 +0000 (00:04 +0000)]
Tweak an import

15 years agoRemove the DynIOError constructor of IOErrorType
Ian Lynagh [Tue, 5 Aug 2008 23:47:20 +0000 (23:47 +0000)]
Remove the DynIOError constructor of IOErrorType
As far as I can see it is never used or exported

15 years agoMove some internals around to simplify the import graph a bit
Ian Lynagh [Tue, 5 Aug 2008 22:13:41 +0000 (22:13 +0000)]
Move some internals around to simplify the import graph a bit

15 years agoMove the Char datatype into ghc-prim
Ian Lynagh [Tue, 5 Aug 2008 20:40:09 +0000 (20:40 +0000)]
Move the Char datatype into ghc-prim

15 years agoRemove an unnecessary import
Ian Lynagh [Tue, 5 Aug 2008 18:23:36 +0000 (18:23 +0000)]
Remove an unnecessary import

15 years agoThe [] definition has moved to ghc-prim
Ian Lynagh [Tue, 5 Aug 2008 18:23:32 +0000 (18:23 +0000)]
The [] definition has moved to ghc-prim

15 years agoFix warnings
Ian Lynagh [Tue, 5 Aug 2008 15:02:50 +0000 (15:02 +0000)]
Fix warnings

15 years agoAdd a missing case to Show AsyncException
Ian Lynagh [Tue, 5 Aug 2008 14:28:11 +0000 (14:28 +0000)]
Add a missing case to Show AsyncException

15 years agoRemove GHC.Dotnet
Ian Lynagh [Mon, 4 Aug 2008 21:58:40 +0000 (21:58 +0000)]
Remove GHC.Dotnet

15 years agoHide standalone deriving clauses from haddock
Ian Lynagh [Mon, 4 Aug 2008 21:16:17 +0000 (21:16 +0000)]
Hide standalone deriving clauses from haddock

15 years agoControl.Exception doesn't need to export assertError
Ian Lynagh [Mon, 4 Aug 2008 16:18:38 +0000 (16:18 +0000)]
Control.Exception doesn't need to export assertError

15 years agoGeneralise the type of mapException; pointed out by Isaac Dupree
Ian Lynagh [Mon, 4 Aug 2008 16:09:41 +0000 (16:09 +0000)]
Generalise the type of mapException; pointed out by Isaac Dupree

15 years agoRemove some unnecessary Data.Tuple imports
Ian Lynagh [Mon, 4 Aug 2008 15:59:56 +0000 (15:59 +0000)]
Remove some unnecessary Data.Tuple imports

15 years agoThe tuple datatype definitions have moved to ghc-prim
Ian Lynagh [Mon, 4 Aug 2008 15:54:20 +0000 (15:54 +0000)]
The tuple datatype definitions have moved to ghc-prim

15 years agomake ExitCode an instance of Exception for nhc98
Malcolm.Wallace@cs.york.ac.uk [Tue, 5 Aug 2008 16:03:30 +0000 (16:03 +0000)]
make ExitCode an instance of Exception for nhc98

15 years agopoke and peek come from Foreign.Storable
Malcolm.Wallace@cs.york.ac.uk [Mon, 4 Aug 2008 16:06:16 +0000 (16:06 +0000)]
poke and peek come from Foreign.Storable

15 years agozipWithM_ comes from Control.Monad
Malcolm.Wallace@cs.york.ac.uk [Mon, 4 Aug 2008 16:03:19 +0000 (16:03 +0000)]
zipWithM_ comes from Control.Monad

15 years agoFix nhc98 code variations to use the extensible exception API.
Malcolm.Wallace@cs.york.ac.uk [Mon, 4 Aug 2008 15:58:42 +0000 (15:58 +0000)]
Fix nhc98 code variations to use the extensible exception API.
There is still only one real exception type in nhc98, so it is not truly
extensible.  But this is enough to get the base package building again.

15 years agonhc98 needs the Prelude for this module
Malcolm.Wallace@cs.york.ac.uk [Mon, 4 Aug 2008 13:38:53 +0000 (13:38 +0000)]
nhc98 needs the Prelude for this module

15 years agoChange some imports and derive Show (Either a b)
Ian Lynagh [Mon, 4 Aug 2008 00:41:47 +0000 (00:41 +0000)]
Change some imports and derive Show (Either a b)
rather than writing it by hand in GHC.Show

15 years agoWindows fixes
Ian Lynagh [Sun, 3 Aug 2008 18:03:45 +0000 (18:03 +0000)]
Windows fixes

15 years agoRemove the duplicate definition of throwTo in Control.Exception
Ian Lynagh [Sun, 3 Aug 2008 14:17:03 +0000 (14:17 +0000)]
Remove the duplicate definition of throwTo in Control.Exception
It now imports GHC.Conc, so it is no longer necessary

15 years agoRemove the only import of GHC.Exts
Ian Lynagh [Sun, 3 Aug 2008 14:19:44 +0000 (14:19 +0000)]
Remove the only import of GHC.Exts

15 years agoMove assertError into GHC.IOBase
Ian Lynagh [Sun, 3 Aug 2008 14:10:40 +0000 (14:10 +0000)]
Move assertError into GHC.IOBase

15 years agoUse onException rather than catchAny
Ian Lynagh [Sun, 3 Aug 2008 11:41:04 +0000 (11:41 +0000)]
Use onException rather than catchAny