|Version 2 (modified by ross@…, 11 years ago) (diff)|
Foreign Function Interface
Adds support for invoking code written in other programming languages from Haskell and vice versa. The FFI is designed as a non-intrusive extension to the Haskell 98 standard.
- addendum to Haskell98.
- Widely accepted and used addendum.
- Provides an essential facility.
- Some feel that the inclusion of unsafePerformIO sends the wrong signal.
- It is true that giving inaccurate foreign imports can invalidate all guarantees given by Haskell, including providing a way to define unsafePerformIO, but that doesn't mean it should be standard.
- The stated purpose of unsafePerformIO in the FFI (hiding marshalling and unmarshalling for otherwise pure functions) can be achieved with a runST-like device if the language has Rank2Types or RankNTypes.