[GHC] #15887: Ideas for a better GHCi editing experience
GHC
ghc-devs at haskell.org
Sun Nov 11 15:21:28 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 Anchpop):
https://github.com/prompt-toolkit/ptpython has all the features I
described here (video at https://youtu.be/XDgIDslyAFM?t=4 ). While the
features might be common in IDEs, that doesn't mean they would be useless
in GHCi. I miss having these features every time I use GHCi.
Another benefit is that it would be easier for beginners to learn. Imagine
a beginner enters the following:
Prelude> myHead [] = Nothing
Prelude> myHead (x:xs) = Just x
They'll be left scratching their head after their program crashes when
they enter `myHead []`! My suggestion would have their `myHead` first
definition automatically trigger multiline mode, so they could easily
continue pattern matching. Teaching beginners about `:{` adds complexity
and clutter to a language as simple and intuitive as Haskell.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15887#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list