ANN: H98 FFI Addendum 1.0, Release Candidate 13

Manuel M T Chakravarty chak at cse.unsw.edu.au
Wed Nov 5 03:24:03 EST 2003


Ross Paterson <ross at soi.city.ac.uk> wrote,

> On Sun, Nov 02, 2003 at 09:31:30PM +1100, Manuel M T Chakravarty wrote:
> > Ross Paterson <ross at soi.city.ac.uk> wrote,
> > > (That is the Latin-1 subset, so calling them ASCII seems a misnomer.)
> > 
> > Yes, but we can't call it Latin-1 either, because that
> > implies a locale (there is also Latin-2 etc).
> 
> CByteString?

That would be CBString given the current naming scheme.  I
don't think that this helps much, as one might argue that in
CString, we also use bytes on the C side.  ASCII may not be
entirely correct, but it conveys the right intuition.

> Do you intend to wait until an implementation of this is committed
> to CVS before finalizing the spec?  (I hope so.)

We already have a reference implementation (by John
Meacham), which is available online.  I am not sure whether
having it in CVS is going to add much.  But we can do this
in two steps, (1) another RC announcement at
haskell at haskell.org (the last was to the FFI list only).
(2) Then, commit after that.

> Incidentally, the spec says CWChar but the libraries say CWchar.
> It seems they always disagreed.  (If the libs change, maybe CPtrdiff
> and CFpos should be CPtrDiff and CFPos too.)

I think, the spec should change.  The naming scheme is that
we capitalise letters in the Haskell identifier after an
underscore in the C identifier; thus,

  ptrdiff_t	  -> CPtrdiff
  sig_atomic_t	  -> CSigAtomic

I will change the spec.

Cheers,
Manuel


More information about the FFI mailing list