Manuel M T Chakravarty chak at
Wed Sep 11 02:42:55 EDT 2002

Malcolm Wallace <Malcolm.Wallace at> wrote,

> > Wolfram Kahl suggested to add functions isNullPtr and
> > isNullFunPtr (with the expected semantics) to the Ptr
> > module.  Opinions?
> Ptr and FunPtr are already instances of Eq, so which is easier to type?
>     isNullPtr x
> or
>     x==nullPtr
> So I don't see the motivation for the new predicates, but I don't have
> any objections either.

Sure, but there is also 

  null = (== [])

in the Prelude and `Maybe.isNothing'.  So, the reasoning for
adding these two functions would be that Haskell has a
tradition of providing predicates like this as alternatives
to the explicit use of (==).

Personally, I also don't care much in either direction.  Any
other opinions?


More information about the FFI mailing list