The following won't compile for me

isnull :: (forall a . [a]) -> Bool
isnull ([] :: forall b . [b]) = True

   Couldn't match expected type `forall b. [b]'
           against inferred type `[a]'
    In the pattern: []

Wrapping it in a constructor doesn't help, though I can define a "null":

data NullList = NullList (forall a . [a])
null = NullList []

isnull2 :: NullList -> Bool
isnull2 (NullList []) = True

Why?

Jim
_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to