[GHC] #15887: Ideas for a better GHCi editing experience

GHC ghc-devs at haskell.org
Sun Nov 11 14:44:10 UTC 2018


#15887: Ideas for a better GHCi editing experience
-------------------------------------+-------------------------------------
        Reporter:  Anchpop           |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  high              |            Milestone:  Research
                                     |  needed
       Component:  Compiler          |              Version:  8.6.2
      Resolution:                    |             Keywords:  QoL
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 j.waldmann):

 Can you show an interactive interpreter for some other language that does
 what you want?

 Navigating a multi-line text - that's the task of an editor. Syntax
 highlighting and indentation - that's the task of an IDE. It sounds as if
 you're suggesting to build a terminal based IDE, and include it with ghci.
 I think it's more manageable to do this the other way around (some editor
 connects to ghci) - and there are projects that do this, e.g.,
 https://github.com/alanz/haskell-lsp

 When I use ghci, and I notice that lines get too long, I first try to
 break them up by using (one-line) definitions (let foo = expression) in
 ghci, and if I'm collecting too many of these, I write them into a file.
 That way, I can edit them better, and I can keep them. Your proposal would
 improve on "edit them better", but not on extra functionality (write to
 file).

 Oh, and I never really need syntax highlighting, There are not that many
 keywords, and I rarely use them. First-order languages rely on keywords
 (e.g., while) for control flow. But this is Haskell, and I more often use
 map, fold, traverse, etc.

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


More information about the ghc-tickets mailing list