Re: ANN: H98 FFI Addendum 1.0, Release Candidate 13

Alastair Reid <[email protected]>
Newsgroups gmane.comp.lang.haskell.ffi
Organization Reid Consulting (UK) Ltd
Message-ID <[email protected]>
> I wonder how this discrepancy between the libraries and the
> report arose. 

For what it's worth, the library has been that way since June 28, 2001:

http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/base/Foreign/
Storable.hs?rev=1.1&content-type=text/x-cvsweb-markup

http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/base/GHC/
Storable.lhs?rev=1.1&content-type=text/x-cvsweb-markup

This seems to be copied from Marcin's QForeign which had the same type from 
Jan 2, 2001 - March 18, 2001 (i.e., the entire lifetime of the library)

http://cvs.sourceforge.net/viewcvs.py/qforeign/qforeign/lib/
QStorable.hsc?rev=1.7&view=markup

> Did I simply make a mistake when writting the
> report (then, this would qualify as an error in the report
> anyway)?

On this evidence, it looks like it's an error in the report.

The type is certainly consistent with the type of plusPtr if you
think about implementing peekByteOff like this:

  peekByteOff p o = peek (plusPtr p o)

And, since peekByteOff is primarily for use when peekElemOff doesn't work 
(i.e., for structs), it makes sense to change the type.

--
Alastair Reid
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.