FFI Report, CVS Id 1.4

Simon Peyton-Jones simonpj at microsoft.com
Tue Jun 5 05:30:31 EDT 2001

| Subject: FFI Report, CVS Id 1.4
| ...is available at
|   http://www.cse.unsw.edu.au/~chak/haskell/ffi.{ps.gz,tex}

Good stuff, Manuel.  Thanks!

Suggestion: would you like to add this to the CVS repository.
Then others can get hold of it, and even modify it (e.g. correct
typos, add examples).  It's inefficient to type a message saying
"add a comma after "..bubble.."".

There's an obvious place for it.  The Haskell Report is in the
CVS repository cvs.haskell.org in the 'module' haskell-report.
	cvs checkout haskell-report

There is a sub-directory for report/ and another for libraries/,
so you could just create a directory for ffi/.   I'm unsure about
access permissions, but I'm copying Jeff Lewis who is root on
that machine.


More generally, the spec is looking good. 

*  I strongly suggest however adding a brief collection of examples 
as Section 1.3  (or Section 2).

* Similarly, for each language-specific section, we must add a
collection of examples.
No one who was not intimately familiar with the FFI would
be able to make sense of 'import dynamic' or 'import wrapper'.  

* You mention en passant that there's a new type CInt.  Very good, but 
the full set of types (and their operations) must be defined in the 
language-specific sections.  Indeed, I suggest we take 3.2 and 
make it a top-level Section, with a sub-section for each language.

* "external types" are mentioned in 3.2.1 but nowhere defined.

* Nowhere do you say that in 
	foreign import ... foo :: type
  that this defines the Haskell variable 'foo' with type 'type'.
  it's just "defines a variable", with nothing about type.)

* I think we are agreed that the stuff about marshalling libraries
belongs in
this document too.  Much of it is already written.  Could it be

More information about the FFI mailing list