[GHC] #95: GHCi :edit command should jump to the the last error

GHC ghc-devs at haskell.org
Sun Jun 8 21:18:43 UTC 2014


#95: GHCi :edit command should jump to the the last error
-------------------------------+-------------------------------------------
        Reporter:              |            Owner:
  martijnislief                |           Status:  patch
            Type:  feature     |        Milestone:  ⊥
  request                      |          Version:  None
        Priority:  normal      |         Keywords:
       Component:  GHCi        |     Architecture:  Unknown/Multiple
      Resolution:  None        |       Difficulty:  Easy (less than 1 hour)
Operating System:              |       Blocked By:
  Unknown/Multiple             |  Related Tickets:
 Type of failure:              |
  None/Unknown                 |
       Test Case:              |
        Blocking:              |
-------------------------------+-------------------------------------------

Comment (by nomeata):

 Hi lortabac. Thanks for your patch.

 One thing that is definitely missing is documentation: You should explain
 this behaviour in the user manual for `:edit`.

 I would name the field `errors` a bit more self-descriptive. Maybe
 `lastErrorLocations`?

 Why do you need `unsafeCoerce`? Can’t you create the `IORef` locally when
 initializing `GHCiState`, in `interactiveUI`, and also pass it as a first
 parameter to your `ghciLogAction`?

 Your `filter` could be more readable a `find` (from `Data.List`).

 That’s it for now :-)

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


More information about the ghc-tickets mailing list