FFI Addendum, RC3 & Open Issues
Manuel M. T. Chakravarty
chak at cse.unsw.edu.au
Wed Apr 24 01:27:25 EDT 2002
Sven Panne <Sven.Panne at informatik.uni-muenchen.de> wrote,
> Manuel M. T. Chakravarty wrote:
> > [...] * 4.1.5: New section discussing the traps & pitfalls of type
> > promotion with C bindings.
> The section in itself is OK, but it's a bit annoying IMHO that one can't
> write a portable foreign import for e.g. Unix' open, which has an optional
> "mode" parameter. I fear we have to reconsider varargs somehow...
The problem is that unless we require the Haskell compiler
to read header files, there is really know way it can know
which arguments are varargs. So, I'd consider it something
that a higher-level tool may provide a more convenient
solution to, but with the basic FFI, you need to write a C
> > [...] * There is the open question, raised by SPJ, of whether we
> > like to have something like
> > import_entity -> [String]
> > export_entity -> [String]
> > See my message from yesterday.
> I would vote for the change, but could live with the current state of affairs.
As this is the only response re this point, I will effect
> > [ new "threadsafe" mode ]
> Hmmm, I'm not so sure about this: Although it looks like something convenient,
> is there a real *need* for it or could the same be achieved by using additional
> (threading) library features? We should be aware of feature creep...
We knew that there will be an extra mode for threads all
along and Sigbjorn's proposal is simpler than the one that I
More information about the FFI