cvs commit: hugs98/docs ffi-notes.txt hugs98/lib/exts ForeignPtr.hs hugs98/src .cvsignore HsFFI.h MkInstal.in builtin.c hugs98/tests testScript

Alastair Reid reid@glass.cse.ogi.edu
Fri, 9 Aug 2002 07:25:02 -0700


reid        2002/08/09 07:25:02 PDT

  Modified files:
    docs                 ffi-notes.txt 
    lib/exts             ForeignPtr.hs 
    src                  .cvsignore HsFFI.h MkInstal.in builtin.c 
    tests                testScript 
  Log:
  Cleanup:
  
  ffi-notes:
  - document ffihugs
  ForeignPtr:
  - correct type (oops)
  HsFFI.h:
  - rearrange, refactor
  - I made an effort to change these definitions:
  
     typedef float          HsFloat;
     typedef double         HsDouble;
  
    to the more correct:
  
     typedef float          HsFloat;
     typedef float          HsDouble;
  
    But if you do this, there's no way to implement CDouble so you can't call
    sin, cos, etc. so I left the definitions alone.
  
    The long term fix is obvious: make Hugs support both Float and Double.
    All the code is in there (grep USE_DOUBLE_PRECISION *.[ch]) - all
    we have to do is rearrange the ifdefs.
    I don't propose to do this until after the release.  For now, we'll
    just have to put up with the fact that you lose precision when you pass
    a double through Hugs.
    (When we clean this up, I'd like to kill support for HugsAPI1-3,
    eliminate the duplication between HsFFI.h and prelude.h, cleanup int64
    support, etc. and look to see how much of builtin.c, iomonad.c, timeprim.c,
    dirprim.c, etc. we can kill.  Hmmm, can we kill primSinFloat and friends
    too?)
  builtin.c:
  - minor cleanup to do with float/double distinction.
  MkInstall.in:
  - made 'make install_ffi' work again
  testScript:
  - hardwire the library search path in case anyone has defined HUGSFLAGS
    to point to some other installation or to a hierarchial install.
  
  Revision  Changes    Path
  1.8       +3 -3      hugs98/docs/ffi-notes.txt
  1.3       +1 -1      hugs98/lib/exts/ForeignPtr.hs
  1.3       +1 -0      hugs98/src/.cvsignore
  1.6       +77 -77    hugs98/src/HsFFI.h
  1.17      +10 -8     hugs98/src/MkInstal.in
  1.29      +20 -12    hugs98/src/builtin.c
  1.16      +1 -1      hugs98/tests/testScript