wakey wakey!

Simon Marlow simonmar at microsoft.com
Fri Oct 27 05:58:43 EDT 2000

> - So, it is decided to nuke AddrOff?

I don't think anyone argued in favour of keeping it, so yes.

> - mallocArray/mallocBytes Versus mallocElems: Isn't
>   mallocBytes redundant?  mallocArray on Word8 should be the
>   same, shouldn't it?

True, but might be less convenient because you'd have to explicitly cast the
result type from Ptr Word8 to whatever you wanted.  sizeof and alignment
work in units of bytes, so it makes sense to have a version of malloc that
does too.

> Re Ptr:
> - Why call it `ptrPlusBytes' when there is no other
>   `ptrPlus'? (I could imagine one, which adds multiples of
>   the size of the `a' in `Ptr a'.)

I don't have a preference - maybe call it "plusPtr" to be consistent with
"plusAddr"?  Or change them both to "xxxPlus"?

> - Would `freeHaskellFunPtr' replace
>   `IOExts.freeHaskellFunctionPtr'? 

I don't think it would be a replacement.  You have the option of using
FunPtr or Addr for the result of a f.e.d.


More information about the FFI mailing list