> And Ptr is what?
> 
> "type Ptr a = Addr" makes "Ptr a" the same as "Ptr b" for any a,b.

But
    newtype Ptr a = Ptr Addr
does not allow Ptr a to equal Ptr b.

> IMHO Haskell should allow newtypes in foreign calls (I'm only not sure
> if it should require the constructor to be accessible).

The current primitive FFI proposal does allow newtypes in foreign
calls (and it is implemented, at least in nhc98 - would anyone from
Hugs/ghc-HQ like to comment on their support?).

Regards,
    Malcolm


Reply via email to