That's strange, if you are using the HEAD. I get Prelude Data.Generics> (\x -> case cast x of Just x'@(a,b) -> print x'; Nothing -> putStrLn "No match") (2::Int,3::Int) No match
Incidentally, the 'no match' is because you aren't fixing the type of 'a' and 'b', so they are ambiguous and are defaulted to (Integer,Integer). Simon | -----Original Message----- | From: [EMAIL PROTECTED] [mailto:glasgow-haskell-bugs- | [EMAIL PROTECTED] On Behalf Of Frederik Eaton | Sent: 24 May 2005 10:19 | To: Simon Peyton-Jones | Cc: glasgow-haskell-bugs@haskell.org | Subject: Re: ghci obscurity | | Thank you! | | I imagine that if you think you've fixed it then you have, but here's | an example: | | Prelude Data.Generics> (\x -> case cast x of Just x'@(a,b) -> print x'; Nothing -> putStrLn "No | match") (2::Int,3::Int) | | Top level: | No instance for (Show (IO ())) | arising from use of `print' at Top level | Probable fix: add an instance declaration for (Show (IO ())) | In a 'do' expression: print it | | I think the real error is that (,) is missing an instance... | | Frederik _______________________________________________ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs