|
RE: incorrect type error message: msg#00056lang.haskell.glasgow.bugs
Your wish is my command | > The reason there's an error message at all is because of the | > monomorphism restriction. So that's not surprising. | > Can you suggest a better error message? I'm always looking for ways to | > report errors more informatively. | | It may be hard to do, but it would be helpful in cases like this for | the error to mention the fact that the monomorphism restriction has fired. | Connecting the fact that the restriction has been applied and the particular | error may be a challenge. Just a thought. module Foo where e = fmap id 1 cam-02-unx:~/tmp$ $gpj -c Foo.hs Foo.hs:5: No instance for (Num (f a)) arising from the literal `1' at Foo.hs:5 Probable cause: the monomorphism restriction applied to the following: e :: f a (bound at Foo.hs:5) In the second argument of `fmap', namely `1' In a right-hand side of function `e': fmap id 1
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: TH bug?, Simon Peyton-Jones |
|---|---|
| Next by Date: | [ ghc-Bugs-645296 ] configure doesn't recognise platform, noreply |
| Previous by Thread: | RE: incorrect type error message, Bernard James POPE |
| Next by Thread: | Re: incorrect type error message, Bernard James POPE |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |