cvs commit: hugs98/lib Prelude.hs hugs98/lib/exts ForeignPtr.hs Foreign.hs hugs98/src connect.h iomonad.c type.c hugs98/src/unix convert_libraries

Alastair Reid reid@glass.cse.ogi.edu
Sun, 4 Aug 2002 16:58:39 -0700


reid        2002/08/04 16:58:39 PDT

  Modified files:
    lib                  Prelude.hs 
    lib/exts             Foreign.hs 
    src                  connect.h iomonad.c type.c 
    src/unix             convert_libraries 
  Added files:
    lib/exts             ForeignPtr.hs 
  Log:
  Added ForeignPtr a
  
  Deviations from spec:
  
  1) Instead of newForeignPtr which requires preemptive concurrency to
     work right, we provide makeForeignPtr which does not.
  
     Given my druthers, I'd call the version Hugs provides newForeignPtr
     but it has a different type and it seems best to avoid gratuitious
     confusion for now.
  
  2) addForeignPtrFinalizer isn't provided because I'm feeling lazy.
  
     To be honest, I don't know when you would use this function.  But,
     if we ever find a use for it, I guess I'll implement it.
  
  ALL THIS FRESH CODE IS UNTESTED.  It loads and it is based on
  the implementation of ForeignObj so it can't be far off but
  I haven't tested it so watch out.
  
  Revision  Changes    Path
  1.28      +2 -1      hugs98/lib/Prelude.hs
  1.6       +4 -2      hugs98/lib/exts/Foreign.hs
  1.42      +3 -2      hugs98/src/connect.h
  1.28      +30 -11    hugs98/src/iomonad.c
  1.49      +7 -5      hugs98/src/type.c
  1.10      +1 -1      hugs98/src/unix/convert_libraries