Updates to FFI spec

Manuel M T Chakravarty chak at cse.unsw.edu.au
Sun Aug 11 02:25:43 EDT 2002


Alastair Reid <alastair at reid-consulting-uk.ltd.uk> wrote,

> For those not on the cvs mailing list:
> 
> I've applied all the changes discussed over the last 2 moniths that
> received some support and no dissent.
>   
>   Changes since RC5:
>   * Author list: changed Alastair Reid's institution
>   * 4.1.1: Removed [lib] from impent syntax and discussion
[..]
>   * 4.1.4: Removed all mention of library objects

Is SimonPJ ok with that?  We added [lib] for him (and .NET).

> You will need this file:
> 
>   http://www.cse.unsw.edu.au/~chak/haskell/grammar.sty
> 
> to build it.  (I came close to adding this file to the repo but
> figured that Manuel must have a reason for not having done so
> himself.)

I wanted to change some stuff first and not track it in two
CVS repos.

> - I'd like to see a standard way to call the GC from C
> 
>     http://www.mail-archive.com/ffi@haskell.org/msg00565.html
>   
>   Note that Hugs and GHC have had this for ages except that we call the
>   function 'performGC' and there's no way to control how many generations
>   are collected.

I don't have a strong opinion on this one.

> - I see the question of Function prototypes as a portability problem
>   waiting to happen.  Either Hugs and GHC are right (you should use the
>   user-supplied header file or NHC is right (you should ignore the
>   header file).  They can't both be right if we want portable code
>   so the report should be clear about which one is right.
> 
>   (Given my druthers, I'd drop header files from the foreign import syntax
>   and say that you have to specify it on the command line or propose that
>   we standardize some variant of the GHCism {-# -include "foo.h" #-}.  But
>   I'm not excited enough about it to push hard for this.)

I am still in favour of user-supplied header files and the
mechanism as it is defined in the spec right now.

> - Changes to hs_init 
> 
>     http://www.mail-archive.com/ffi@haskell.org/msg00539.html

I am ok with that.  Currently, there is a problem with the
version that is in the spec and GHC in that GHC requires an
extra argument to initialise modules.  So, it all depends a
bit on how far SimonM thinks its implementable.

Cheers,
Manuel

PS: Sorry for my prolonged procrastination over these issues
    and thanks for picking them up.



More information about the FFI mailing list