Switch over to the new hierarchical libraries
---------------------------------------------
This commit reorganises our libraries to use the new hierarchical
module namespace extension.
The basic story is this:
- fptools/libraries contains the new hierarchical libraries.
Everything in here is "clean", i.e. most deprecated stuff has
been removed.
- fptools/libraries/base is the new base package
(replacing "std") and contains roughly what was previously
in std, lang, and concurrent, minus deprecated stuff.
Things that are *not allowed* in libraries/base include:
Addr, ForeignObj, ByteArray, MutableByteArray,
_casm_, _ccall_, ``'', PrimIO
For ByteArrays and MutableByteArrays we use UArray and
STUArray/IOUArray respectively now.
Modules previously called PrelFoo are now under
fptools/libraries/GHC. eg. PrelBase is now GHC.Base.
- fptools/libraries/haskell98 provides the Haskell 98 std.
libraries (Char, IO, Numeric etc.) as a package. This
package is enabled by default.
- fptools/libraries/network is a rearranged version of
the existing net package (the old package net is still
available; see below).
- Other packages will migrate to fptools/libraries in
due course.
NB. you need to checkout fptools/libraries as well as
fptools/hslibs now. The nightly build scripts will need to be
tweaked.
- fptools/hslibs still contains (almost) the same stuff as before.
Where libraries have moved into the new hierarchy, the hslibs
version contains a "stub" that just re-exports the new version.
The idea is that code will gradually migrate from fptools/hslibs
into fptools/libraries as it gets cleaned up, and in a version or
two we can remove the old packages altogether.
- I've taken the opportunity to make some changes to the build
system, ripping out the old hslibs Makefile stuff from
mk/target.mk; the new package building Makefile code is in
mk/package.mk (auto-included from mk/target.mk).
The main improvement is that packages now register themselves at
make boot time using ghc-pkg, and the monolithic package.conf
in ghc/driver is gone.
I've updated the standard packages but haven't tested win32,
graphics, xlib, object-io, or OpenGL yet. The Makefiles in
these packages may need some further tweaks, and they'll need
pkg.conf.in files added.
- Unfortunately all this rearrangement meant I had to bump the
interface-file version and create a bunch of .hi-boot-6 files :-(
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.14 2002/02/12 10:52:47 simonmar Exp $
+# $Id: Makefile,v 1.15 2002/02/12 15:17:34 simonmar Exp $
TOP=..
include $(TOP)/mk/boilerplate.mk
TOP=..
include $(TOP)/mk/boilerplate.mk
SRC_HC_OPTS += -fglasgow-exts -cpp -Iinclude
SRC_HSC2HS_OPTS += -Iinclude
SRC_HC_OPTS += -fglasgow-exts -cpp -Iinclude
SRC_HSC2HS_OPTS += -Iinclude
+# -----------------------------------------------------------------------------
+# Per-module flags
+
# ESSENTIAL, for getting reasonable performance from the I/O library:
# ESSENTIAL, for getting reasonable performance from the I/O library:
-GHC/IOBase_HC_OPTS = -funbox-strict-fields
+GHC/IOBase_HC_OPTS = -funbox-strict-fields
+
+Data/Array/Storable_HC_OPTS = -funbox-strict-fields
# -----------------------------------------------------------------------------
# PrimOpWrappers
# -----------------------------------------------------------------------------
# PrimOpWrappers
-- Stability : experimental | provisional | stable
-- Portability : portable | non-portable (<replaceable>reason(s)</replaceable>)
--
-- Stability : experimental | provisional | stable
-- Portability : portable | non-portable (<replaceable>reason(s)</replaceable>)
--
--- $Id: libraries.sgml,v 1.6 2001/12/21 15:07:26 simonmar Exp $
+-- $Id: libraries.sgml,v 1.7 2002/02/12 15:17:34 simonmar Exp $
--
-- <replaceable>Description</replaceable>
-----------------------------------------------------------------------------
--
-- <replaceable>Description</replaceable>
-----------------------------------------------------------------------------
<variablelist>
<varlistentry>
<variablelist>
<varlistentry>
- <term><literal>$Id: libraries.sgml,v 1.6 2001/12/21 15:07:26 simonmar Exp $</literal></term>
+ <term><literal>$Id: libraries.sgml,v 1.7 2002/02/12 15:17:34 simonmar Exp $</literal></term>
<listitem>
<para>is optional, but usually included if the module is
under CVS or RCS control.</para>
<listitem>
<para>is optional, but usually included if the module is
under CVS or RCS control.</para>
- hPutBuf :: Handle -> Ptr a -> Int -> IO ()
- hGetBuf :: Handle -> Ptr a -> Int -> IO Int
- fixIO :: (a -> IO a) -> IO a
+ hPutBuf :: Handle -> Ptr a -> Int -> IO ()
+ hGetBuf :: Handle -> Ptr a -> Int -> IO Int
+ fixIO :: (a -> IO a) -> IO a
+ hSetEcho :: Handle -> Bool -> IO ()
+ hGetEcho :: Handle -> IO Bool
+ hIsTerminalDevice :: Handle -> IO Bool
List -> Data.List
exports [](..)
List -> Data.List
exports [](..)
- Numeric -> Numeric
- added showHex, showOct, showBin & showIntAtBase from NumExts,
- (not exported yet - these aren't H98)
- but left out floatToDouble & doubleToFloat (realToFrac is more general).
-
System -> System.Exit, System.Environment, System.Cmd
split into three modules
System -> System.Exit, System.Environment, System.Cmd
split into three modules
Locale -> System.Locale
Maybe -> Data.Maybe
Monad -> Data.Monad
Locale -> System.Locale
Maybe -> Data.Maybe
Monad -> Data.Monad
Random -> System.Random
Ratio -> Data.Ratio
Time -> System.Time
Random -> System.Random
Ratio -> Data.Ratio
Time -> System.Time