cvs commit: hugs98/docs ffi-notes.txt hugs98/src static.c

Alastair Reid reid@glass.cse.ogi.edu
Mon, 26 Aug 2002 16:12:35 -0700


reid        2002/08/26 16:12:35 PDT

  Modified files:
    docs                 ffi-notes.txt 
    src                  static.c 
  Log:
  Fix for the problem Jeff reported:
  
    fullerExpand doesn't apply recursively because it seems like the ffi
    might want to know abotu the difference between two Ptr types (say)
    which might appear to be the same if you expanded the newtypes.
  
      newtype X = X Int
      newtype Y = Y Int
      foreign import ccall foo :: Ptr X -> Ptr Y -> IO ()
  
    (Sorry not to be more specific about what could go wrong - I'm
    just trying to play safe here rather then having a specific
    error in mind.)
  
    The result of all this is that you have to apply fullerExpand
    as you walk the structure of the type.  This fix tries to do this
    systematically instead of doing it in a few random places where it
    seemed necessary or I felt like it.
  
  I'm also committing a documentation change for the +L +L change.
  
  Revision  Changes    Path
  1.9       +1 -1      hugs98/docs/ffi-notes.txt
  1.83      +13 -13    hugs98/src/static.c