| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 :-(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Re-organisation of ghc/lib/std and hslibs/lang
----------------------------------------------
In brief: move deprecated features out of ghc/lib/std and into
hslibs/lang, move new FFI libraries into ghc/lib/std and start
using them.
- foreign import may now return an unboxed type (this was
advertised to work before, but in fact didn't). Subsequent
cleanups in PrelInt/PrelWord.
- Ptr is now defined in ghc/lib/std/PrelPtr.lhs. Ptr is no
longer a newtype of Addr, it is defined directly in terms of
Addr#.
- PrelAddr has disappeared from ghc/lib/std, all uses of Addr in
ghc/lib/std have been replaced with Ptr. The definitions of
Addr has been moved to hslibs/lang/Addr.lhs, as has
lots of other Addr-related stuff.
- ForeignObj has been removed from ghc/lib/std, and replaced with
ForeignPtr. The definition of ForeignObj has been moved to
hslibs/lang/ForeignObj.lhs.
- Most of the new FFI has been moved into ghc/lib/std in the form
of modules PrelMarshalAlloc, PrelCString, PrelCError,
PrelMarshalError, PrelMarshalArray, PrelMarshalUtils,
PrelCTypes, PrelCTypesISO, and PrelStorable. The corresponding
modules in hslibs/lang simply re-export the contents of these
modules.
- PrelPosixTypes defines a few POSIX types (CMode == mode_t,
etc.)
- PrelCError changed to access errno using foreign label and peek
(the POSIX book I have says that errno is guaranteed to be an
extern int, so this should be OK until I get around to making
errno thread-safe).
- Hacked the macros that generate the code for CTypes and
CTypesISO to generate much less code
(ghc/lib/std/cbits/CTypes.h).
- RtsAPI is now a bit more honest when it comes to building heap
objects (it uses the correct constructors).
- the Bits class and related stuff has been moved to ghc/lib/std
(it was simpler this way).
- Directory and System have been converted to use the new FFI.
|
|
|
|
|
|
| |
- fix copyrights
- remove some unused imports
- comment formatting fixes
|
|
|
|
| |
Removed -fcompiling-prelude flag (now removed from compiler)
|
|
|
|
|
|
|
|
|
|
| |
Make it so that -fcompiling-prelude applies only
for Prelude modules (i.e. ones called Prelxxx).
I've done this with an {-# OPTIONS #-} line in each
such module (they all has -fno-implicit-prelude anyway)
but a less repetitive approach in the Makefile would
be welcome.
|
|
Move 4.01 onto the main trunk.
|