|
non-intuitive error message in ghci: msg#00012lang.haskell.glasgow.bugs
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
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Bad eta expand, Donald Bruce Stewart |
|---|---|
| Next by Date: | internal error: eval_thunk_selector: strange selectee 29, Ketil Z. Malde |
| Previous by Thread: | Bad eta expand, Donald Bruce Stewart |
| Next by Thread: | internal error: eval_thunk_selector: strange selectee 29, Ketil Z. Malde |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |