[GHC] #9049: Expose srcLoc from the assertion architecture to allow better error messages

GHC ghc-devs at haskell.org
Mon Jan 5 16:04:13 UTC 2015


#9049: Expose srcLoc from the assertion architecture to allow better error
messages
-------------------------------------+-------------------------------------
        Reporter:  nh2               |                   Owner:  gridaphobe
            Type:  feature request   |                  Status:  patch
        Priority:  normal            |               Milestone:  7.12.1
       Component:  Compiler          |                 Version:  7.8.2
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:  Phab:D578
-------------------------------------+-------------------------------------

Comment (by gridaphobe):

 Replying to [comment:27 simonpj]:
 > You did not respond to bullet 5 of comment:24.  I'd like to see
 displayed stacks looking like:
 > {{{
 >   foo, called at Bar.hs line 5
 >   wim, called as Wobble.hs line 9
 >   ...etc...
 > }}}
 > Currently we can get the call sites but not the function being called.
 I think it'd make the stacks a lot more informative.

 Sorry, my response was jumbled in with the rename to `CallStack`

 > ... but it looks like the `CtOrigin` that we get may not provide enough
 info. In my test-case at least, I'm getting a `TypeEqOrigin`, which isn't
 particularly helpful.

 The `TypeEqOrigin` appears to come from call-sites; I also get an
 `IPOccOrigin` when the IP is used.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9049#comment:28>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list