[GHC] #8809: Prettier error messages?

GHC ghc-devs at haskell.org
Wed Mar 30 04:32:08 UTC 2016


#8809: Prettier error messages?
-------------------------------------+-------------------------------------
        Reporter:  joelteon          |                Owner:
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.9
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
  #8809,#10073,#10179                |
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by niteria):

 I've run into this while trying to hack together something like
 http://gcc.godbolt.org/, but for Haskell, with Core, Stg, Cmm and Asm
 output.
 With `-g` all the location data is already nicely tracked all the way to
 Asm and the only piece missing is a way to pretty print with some
 annotations about the ranges.

 I took a stab at adding a parameter to `Doc`, but I haven't gone through
 with it because
 [https://phabricator.haskell.org/diffusion/GHC/browse/master/compiler/main/ErrUtils.hs;eb6b7094c80fda5cc7c1d1ed3386486996f24bff$75-132
 some other types] use it transitively and I couldn't decide between `SDoc
 a` and `SDoc Void` there.

 [http://hackage.haskell.org/package/pretty-1.1.3.2/docs/Text-PrettyPrint-
 Annotated.html pretty] appears to be the same library GHC uses and as
 pointed out by bgamari already supports annotations. Does anyone know if
 they diverged in functionality/semantics? If not, would it be a useful
 step to migrate GHC's `Doc` to annotated version?

 I think an argument against it is that it doesn't have a `Monad` instance,
 but I don't immediately see the benefit of having it.

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


More information about the ghc-tickets mailing list