28 Nov
2000
28 Nov
'00
9:25 p.m.
Dear foreigners Simon and I noticed this morning that ForeignObj should really be parameterised. The current type of newForeignObj is newForeignObj :: Ptr a -> IO () -> IO ForeignObj This immediately loses the type information on the Ptr! Shouldn't it be newForeignObj :: Ptr a -> IO () -> IO (ForeignObj a) Or maybe we should shorten it to (FPtr a)? ("F" for "finalised".) Similarly withFPtr :: FPtr a -> (Ptr a -> IO b) -> IO b It's bizarre to have withForeignObj :: ForeignObj -> (Ptr a -> IO b) -> IO b What think you? Simon