10 Jun
2003
10 Jun
'03
7:25 a.m.
In article <200306091626.18920.alastair@reid-consulting-uk.ltd.uk>, Alastair Reid <alastair@reid-consulting-uk.ltd.uk> wrote:
I'm not convinced that merging them into a single function is desirable, but, if we wanted to, I think a better FPish solution is to use
Maybe (FinalizerPtr a)
I think the most FPish solution would be this: newForeignPtr :: Ptr a -> IO (ForeignPtr a) addForeignPointerFinalizer :: ForeignPtr a -> FinalizerPtr a -> IO () That gives you an empty finalizers function and an add finalizers function, like [] and (:). I don't really care, actually, as long as I can obtain the same functionality. -- Ashley Yakeley, Seattle WA