Need help on Ptr

Christian Buschmann christian@snowblack.de
Thu, 15 May 2003 19:02:13 +0200


Hi!
Can someone tell me, how i can check, if a Ptr is a nullPtr.
Now I am using this function, but I think its not a very nice one:

  import Ptr

  isNullPtr :: (Ptr a) -> Bool
  isNullPtr ptr = (minusPtr ptr nullPtr) == 0

Maybe someone has got a better idea...

   christian