Manuel M T Chakravarty <[EMAIL PROTECTED]> writes:

> Sure, but there is also 
>   null = (== [])
> in the Prelude and `Maybe.isNothing'.

No, the definition of null is
    null [] = True
which is quite different from (==[]) because it has a less-constrained type.
    null   :: [a] -> Bool
    (==[]) :: Eq a => [a] -> Bool

Likewise,
    isNothing   :: Maybe a -> Bool
    (==Nothing) :: Eq a => Maybe a -> Bool

So there are good reasons for having separate predicates testing
the null/empty case at those polymorphic types, but no reason (except
consistency of naming) for a pseudo-polymorphic type like Ptr a.

However, consistency of naming is perhaps sufficient reason to add them
anyway.

Regards,
    Malcolm
_______________________________________________
FFI mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/ffi

Reply via email to