#2606: Backspace, delete, etc. don't work in ghci in HEAD
-------------------------------+--------------------------------------------
Reporter: tim | Owner:
Type: bug | Status: closed
Priority: normal | Component: GHCi
Version: 7.2.1 | Resolution: invalid
Keywords: | Testcase:
Blockedby: | Difficulty: Unknown
Os: Linux | Blocking:
Architecture: x86_64 (amd64) | Failure: None/Unknown
-------------------------------+--------------------------------------------
Comment(by judahj):
I believe you're confusing two different things:
1) The ghci command prompt (e.g., `Prelude>`). This is used to specify
commands which ghci should run. This always (as of ghc-6.10.4, IIRC) uses
haskeline and should always enable the use of arrow keys.
2) The `getLine` action. This is a specific action which ghci may run as
part of a larger function or program. It never uses haskeline, readline,
etc.
This ticket was about #1, not #2, so most of the above comments don't
apply to your issue.
Here's an example of using the haskeline package from within ghci.
(Assuming you've already installed it with, for example, `cabal install
haskeline`):
Prelude> :m +System.Console.Haskeline
Prelude System.Console.Haskeline> runInputT defaultSettings
(getInputLine "prompt>")
prompt>This is an input line.
Just "This is an input line."
You can look at the documentation on Hackage for more information about
the `haskeline` and `readline` packages.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2606#comment:22>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs