More obvious would be: import Foreign(Ptr, nullPtr) isNullPtr :: Ptr a -> Bool isNullPtr p = p == nullPtr -- Alastair