[GHC] #12917: Location info for error message with multiple source locations
GHC
ghc-devs at haskell.org
Fri Dec 2 15:29:47 UTC 2016
#12917: Location info for error message with multiple source locations
-------------------------------------+-------------------------------------
Reporter: gracjan | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by gracjan):
This:
{{{
MonadFailErrors.hs:44:5: error:
• No instance for (MonadFail (ST s))
arising from a do statement
with the failable pattern ‘Just x’
• In a stmt of a 'do' block: Just x <- undefined
In the expression:
do { Just x <- undefined;
undefined }
In an equation for ‘st’:
st
= do { Just x <- undefined;
undefined }
}}}
Could be better described with:
{{{
MonadFailErrors.hs:44:5-11: No instance for (MonadFail (ST s)) arising
from a failable patter in a do statement
}}}
And count on Emacs to highlight relevant source code part, that is `Just
x`.
We could try to be more mouthful:
{{{
MonadFailErrors.hs:44:5-11: No instance for (MonadFail (ST s)) arising
from a failable patter in a do statement
MonadFailErrors.hs:41:4: that begins here
}}}
but in this case this is overkill. In other cases it might be useful.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12917#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list