cvs commit: fptools/ghc/rts RtsAPIDeprec.c Prelude.h RtsAPI.c fptools/ghc/includes RtsAPI.h fptools/ghc/driver PackageSrc.hs fptools/ghc/compiler/prelude PrelNames.lhs TysWiredIn.lhs fptools/ghc/compiler/typecheck TcForeign.lhs TcInstDcls.lhs ...

Simon Marlow simonmar@glass.cse.ogi.edu
Thu, 11 Jan 2001 09:25:59 -0800


simonmar    2001/01/11 09:25:59 PST

  Modified files:
    ghc/rts              Prelude.h RtsAPI.c 
    ghc/includes         RtsAPI.h 
    ghc/driver           PackageSrc.hs 
    ghc/compiler/prelude PrelNames.lhs TysWiredIn.lhs 
    ghc/compiler/typecheck TcForeign.lhs TcInstDcls.lhs 
    ghc/lib/std          CPUTime.lhs Makefile PrelByteArr.lhs 
                         PrelDynamic.lhs PrelForeign.lhs 
                         PrelHandle.lhs PrelIO.lhs PrelIOBase.lhs 
                         PrelInt.lhs PrelPack.lhs PrelWeak.lhs 
                         PrelWord.lhs System.lhs Time.lhs 
    ghc/lib/std/cbits    progargs.c 
    hslibs/lang          Addr.lhs ArrayBase.hs Bits.lhs 
                         ByteArray.lhs CError.lhs CString.lhs 
                         CTypes.lhs CTypesISO.lhs ForeignObj.lhs 
                         ForeignPtr.lhs GlaExts.lhs IOExts.lhs 
                         Int.lhs MarshalAlloc.lhs MarshalArray.lhs 
                         MarshalError.lhs MarshalUtils.lhs 
                         MutableArray.lhs NumExts.lhs 
                         PackedString.lhs Ptr.lhs StablePtr.lhs 
                         Storable.lhs Weak.lhs Word.lhs 
    hslibs/lang/cbits    HsLang.h 
    hslibs/lang/doc      IOExts.sgml 
    hslibs/net           SocketPrim.lhs 
    hslibs/posix         PosixIO.lhs 
  Added files:
    ghc/rts              RtsAPIDeprec.c 
    ghc/lib/std          Directory.hsc PrelBits.lhs PrelCError.lhs 
                         PrelCString.lhs PrelCTypes.lhs 
                         PrelCTypesISO.lhs PrelMarshalAlloc.lhs 
                         PrelMarshalArray.lhs PrelMarshalError.lhs 
                         PrelMarshalUtils.lhs PrelPosixTypes.hsc 
                         PrelPtr.lhs PrelStorable.lhs 
    ghc/lib/std/cbits    CTypes.h 
    hslibs/lang          ForeignObj.hi-boot 
  Removed files:
    ghc/lib/std          Directory.lhs PrelAddr.lhs 
    ghc/lib/std/cbits    createDirectory.c directoryAux.c 
                         getCurrentDirectory.c 
                         getDirectoryContents.c removeDirectory.c 
                         removeFile.c renameDirectory.c 
                         renameFile.c setCurrentDirectory.c 
    hslibs/lang/cbits    CError.c 
  Log:
  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.
  
  Revision  Changes    Path
  1.13      +49 -16    fptools/ghc/rts/Prelude.h
  1.24      +20 -31    fptools/ghc/rts/RtsAPI.c
  1.19      +9 -3      fptools/ghc/includes/RtsAPI.h
  1.18      +9 -3      fptools/ghc/driver/PackageSrc.hs
  1.22      +33 -23    fptools/ghc/compiler/prelude/PrelNames.lhs
  1.66      +52 -26    fptools/ghc/compiler/prelude/TysWiredIn.lhs
  1.29      +7 -5      fptools/ghc/compiler/typecheck/TcForeign.lhs
  1.107     +2 -2      fptools/ghc/compiler/typecheck/TcInstDcls.lhs
  1.27      +2 -2      fptools/ghc/lib/std/CPUTime.lhs
  1.56      +4 -1      fptools/ghc/lib/std/Makefile
  1.10      +2 -50     fptools/ghc/lib/std/PrelByteArr.lhs
  1.6       +2 -2      fptools/ghc/lib/std/PrelDynamic.lhs
  1.17      +28 -82    fptools/ghc/lib/std/PrelForeign.lhs
  1.66      +36 -40    fptools/ghc/lib/std/PrelHandle.lhs
  1.18      +28 -29    fptools/ghc/lib/std/PrelIO.lhs
  1.32      +25 -22    fptools/ghc/lib/std/PrelIOBase.lhs
  1.3       +190 -132  fptools/ghc/lib/std/PrelInt.lhs
  1.16      +21 -20    fptools/ghc/lib/std/PrelPack.lhs
  1.15      +2 -7      fptools/ghc/lib/std/PrelWeak.lhs
  1.3       +234 -206  fptools/ghc/lib/std/PrelWord.lhs
  1.28      +31 -133   fptools/ghc/lib/std/System.lhs
  1.25      +4 -4      fptools/ghc/lib/std/Time.lhs
  1.4       +3 -3      fptools/ghc/lib/std/cbits/progargs.c
  1.13      +165 -72   fptools/hslibs/lang/Addr.lhs
  1.8       +1 -2      fptools/hslibs/lang/ArrayBase.hs
  1.5       +4 -40     fptools/hslibs/lang/Bits.lhs
  1.5       +21 -0     fptools/hslibs/lang/ByteArray.lhs
  1.5       +2 -517    fptools/hslibs/lang/CError.lhs
  1.8       +14 -115   fptools/hslibs/lang/CString.lhs
  1.10      +2 -69     fptools/hslibs/lang/CTypes.lhs
  1.10      +2 -52     fptools/hslibs/lang/CTypesISO.lhs
  1.15      +42 -8     fptools/hslibs/lang/ForeignObj.lhs
  1.4       +3 -57     fptools/hslibs/lang/ForeignPtr.lhs
  1.4       +1 -1      fptools/hslibs/lang/GlaExts.lhs
  1.25      +15 -14    fptools/hslibs/lang/IOExts.lhs
  1.14      +11 -218   fptools/hslibs/lang/Int.lhs
  1.4       +2 -83     fptools/hslibs/lang/MarshalAlloc.lhs
  1.4       +2 -156    fptools/hslibs/lang/MarshalArray.lhs
  1.2       +2 -44     fptools/hslibs/lang/MarshalError.lhs
  1.5       +2 -110    fptools/hslibs/lang/MarshalUtils.lhs
  1.10      +51 -2     fptools/hslibs/lang/MutableArray.lhs
  1.5       +2 -1      fptools/hslibs/lang/NumExts.lhs
  1.9       +2 -1      fptools/hslibs/lang/PackedString.lhs
  1.5       +2 -52     fptools/hslibs/lang/Ptr.lhs
  1.6       +4 -4      fptools/hslibs/lang/StablePtr.lhs
  1.12      +2 -164    fptools/hslibs/lang/Storable.lhs
  1.6       +2 -0      fptools/hslibs/lang/Weak.lhs
  1.18      +27 -205   fptools/hslibs/lang/Word.lhs
  1.3       +1 -4      fptools/hslibs/lang/cbits/HsLang.h
  1.9       +8 -0      fptools/hslibs/lang/doc/IOExts.sgml
  1.19      +4 -4      fptools/hslibs/net/SocketPrim.lhs
  1.12      +4 -4      fptools/hslibs/posix/PosixIO.lhs