Manuel M. T. Chakravarty
chak at cse.unsw.edu.au
Wed Jan 3 19:23:13 EST 2001
"Alastair Reid" <reid at cs.utah.edu> wrote,
> > > I would let freeHaskellFunPtr accept and ignore nullFunPtr, since I
> > > once had to write
> > > when (ptr /= nullFunPtr) $ freeHaskellFunPtr ptr
> > > and it can be seen as consistent with free.
> This sort of behaviour is comon in C but I think this is mostly because C has
> such a weak type system.
> Which is all just my long-winded way of saying I agree with Simon that we
> should not do this. Even if f.e.d. could return nullFunPtr, we should not do
> this because we can express it better using a Maybe.
I think, I agree with this.
More information about the FFI