Jeremy Shaw wrote:

I noticed that the results can be a bit suprising sometimes. See if
you can predict the answers to these (in ghci):

Interesting examples.  Here's another one that I would find problematic:

   *SameType> same Nothing (Just "xyzzy")
   False
   *SameType> same (Nothing :: Maybe String) (Just "xyzzy")
   True

And of course, the case with the integers lifts right up:

   *SameType> same (Just 1) (Just 1)
   False


_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to