Changes between Version 25 and Version 26 of ForeignFunctionInterface


Ignore:
Timestamp:
Nov 18, 2009 11:04:54 PM (4 years ago)
Author:
chak@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ForeignFunctionInterface

    v25 v26  
    5959=== unsafePerformIO === 
    6060 
    61 The FFI libraries will include the function `unsafePerformIO` (as in the FFI addendum).  However, we limit the support use of the function purely to implement memory management and memory access during marshalling for foreign functions that ought to get a pure Haskell type.  Specifically, we will use the following wording (or something close): 
     61Instead of `Foreign.unsafePerformIO`, we will have `Foreign.Marshal.unsafeLocalState`.  Moreover, we limit the support of the function to implementing memory management and memory access —and possibly, C-land initialisation— during marshalling for foreign functions that ought to get a pure Haskell type.  Specifically, we will use the following wording (or something close): 
    6262 
    6363  Wrap a pure computation that uses local memory.  The only IO operations permitted in the IO action passed to `unsafePerformIO` are