logo       

RE: non-intuitive error message in ghci: msg#00073

lang.haskell.glasgow.bugs

Subject: RE: non-intuitive error message in ghci

This bug has gone away in the HEAD, and isn't present in the stable
branch. So I can't reproduce it any more, and I propose to declare it
fixed. Please yell if you find it isn't.

Simon

| -----Original Message-----
| From: glasgow-haskell-bugs-admin@xxxxxxxxxxx
[mailto:glasgow-haskell-bugs-admin@xxxxxxxxxxx] On
| Behalf Of Hal Daume
| Sent: 11 August 2003 20:56
| To: glasgow-haskell-bugs@xxxxxxxxxxx
| Subject: non-intuitive error message in ghci
|
| When we'd try to evaluate a finite map at the prompt, we get an error
| about there not being a show instance:
|
| Prelude> :m Data.FiniteMap
| Prelude Data.FiniteMap> emptyFM
|
| No instance for (Show (FiniteMap key elt))
| arising from use of `print' at <No locn>
| In a 'do' expression pattern binding: print it
|
|
| However, if we have Control.Exception in scope, we get a very
different
| message:
|
| Prelude> :m Prelude Control.Exception Data.FiniteMap
| Data.FiniteMap Control.Exception Prelude> emptyFM
|
| No instance for (Monad (FiniteMap key))
| arising from use of `print' at <No locn>
| In a 'do' expression: print it
|
|
| Presumably this is because Control.Exception introduces some instance
of
| Monad which then confuses the environment. It took me a while to
figure
| this out and I can imagine that it would be confusing to other people
| too.
|
| Is there any (relatively easy) way to get it to report the "real"
error
| message?
|
| - Hal
|
| --
| Hal Daume III | hdaume@xxxxxxx
| "Arrest this man, he talks in maths." | www.isi.edu/~hdaume
| _______________________________________________
| Glasgow-haskell-bugs mailing list
| Glasgow-haskell-bugs@xxxxxxxxxxx
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise