[GHC] #15461: Machine accessible interface to GHCi

GHC ghc-devs at haskell.org
Tue Jul 31 18:31:38 UTC 2018


#15461: Machine accessible interface to GHCi
-------------------------------------+-------------------------------------
           Reporter:  bgamari        |             Owner:  (none)
               Type:  feature        |            Status:  new
  request                            |
           Priority:  normal         |         Milestone:  8.6.1
          Component:  GHCi           |           Version:  8.4.3
           Keywords:  newcomer       |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 For a long time tooling users (e.g. `haskell-mode`) have been treating
 GHCi as a language server. As one would expect this leads to a frustrating
 situation for both GHC developers (who feel constrained in their ability
 to change output) and users (who occasionally suffer breakage, e.g.
 [[https://github.com/haskell/haskell-
 mode/issues/1553#issuecomment-409267399]]).

 Ultimately the solution seems fairly clear:

  1. allow GHCi to expose multiple REPL interfaces (e.g. such that a user
 could have multiple textual REPLs open, all served by the same GHCi
 session)
  2. add a machine-readable request protocol to GHCi, giving tooling users
 a way to use GHCi's functionality without parsing human-readable output

 (1) should be fairly straightforward to implement. (2) on the other hand
 requires some design work (e.g. what does the wire protocol look like?)
 and a fair bit of refactoring (to expose the existing commands in a
 machine-readable manner).

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


More information about the ghc-tickets mailing list