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

On Mon, May 23, 2005 at 09:33:49AM +0100, Simon Peyton-Jones wrote:
> Good point
> 
> Happily, I improved this error message (which has been in SourceForge
> for some time) last Friday.  At least I hope so; you didn't actually
> give an example.   If you do, I'll try it. Or check out the HEAD and see
> if things have improved.
> 
> Simon
> 
> | -----Original Message-----
> | From: [EMAIL PROTECTED]
> [mailto:glasgow-haskell-bugs-
> | [EMAIL PROTECTED] On Behalf Of Frederik Eaton
> | Sent: 21 May 2005 14:34
> | To: glasgow-haskell-bugs@haskell.org
> | Subject: ghci obscurity
> | 
> | Often ghci will give me the following message instead of something
> | helpful:
> | 
> | 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 don't know how hard it would be to fix, but it's kind of a nuisance.
> | It seems to only come up when something else is wrong, but it often
> | comes up *instead* of a good error message for the real problem,
> | making it very hard to track the real problem down.
> | 
> | Frederik
> | 
> | --
> | http://ofb.net/~frederik/
> | _______________________________________________
> | Glasgow-haskell-bugs mailing list
> | Glasgow-haskell-bugs@haskell.org
> | http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
> 

-- 
http://ofb.net/~frederik/
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to