Commit dbed0795 authored by simonmar's avatar simonmar
Browse files

[project @ 2002-02-12 15:17:35 by simonmar]

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 :-(
parent e509b330
......@@ -104,4 +104,7 @@ endif # GHCI
# We do this at the end for cosmetic reasons: it means that the "normal-way"
# runtests will precede the "other-way" recursive invocations of make
include $(FPTOOLS_TOP)/mk/target.mk
NOFIB_TOP := $(TOP)
TOP := $(TOP)/..
include $(TOP)/mk/target.mk
TOP:=$(NOFIB_TOP)
......@@ -2,10 +2,5 @@ TOP = ../..
include $(TOP)/mk/boilerplate.mk
-include opts.mk
# Needed for the fromInt import in GeomNumb; mkdependHS doesn't seem to
# see the {-# OPTIONS flag in the source file.
SRC_HC_OPTS += -syslib lang
include $(TOP)/mk/target.mk
......@@ -2,7 +2,7 @@ module WriteRoutines (outputCodes)
where
--import GlaExts
import PrelBase ( Int(..), word2Int#, int2Word#, and#, or#, shiftL#, shiftRL# )
import GHC.Base ( Int(..), word2Int#, int2Word#, and#, or#, shiftL#, shiftRL# )
import Encode (CodeEvent(..))
-- Start of code added for ghc
......
......@@ -51,11 +51,12 @@ first understand binomial queues. See, for example, David King's
> -- partain
>module Main (main) where
>import ST
>import Array
>import MutableArray
>import System
>import Control.Monad.ST
>import Data.Array.ST
--------------------
Like binomial queues, Fibonacci heaps are based on heap-ordered
......
TOP = ../..
include $(TOP)/mk/boilerplate.mk
SRC_HC_OPTS += -fglasgow-exts -package lang
SRC_HC_OPTS += -fglasgow-exts
# Here's the argument value for the test run
PROG_ARGS = 5000
include $(TOP)/mk/target.mk
{-# OPTIONS -fglasgow-exts #-}
import PrelGHC;
import Complex;
import Array;
import PrelBase;
import GHC.Prim;
import Data.Complex;
import Data.Array;
import GHC.Base ( Int(..) );
type Complex_type = Complex Double;
type Array_type b = Array Int b;
......
......@@ -10,7 +10,7 @@
--! destr_update, indassoc, lowbound, tabulate, upbound, update, valassoc) where {
-- import GlaExts;
-- import Word;
import PrelBase ( Double(..) )
import GHC.Base ( Double(..) )
-- partain fiddle
-- type Complex_type = Complex Double;
data Complex_type = CD# Double# Double#;
......
......@@ -7,9 +7,6 @@ SRCS = Main.hs
# Main is rather big
Main_HC_OPTS = -H110m
SRC_HC_OPTS += -syslib lang
SRC_RUNTEST_OPTS += +RTS -K3m -H20m -RTS
include $(TOP)/mk/target.mk
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment