a more practical version of getLine???

D. Tweed tweed@compsci.bristol.ac.uk
Tue, 26 Feb 2002 10:12:05 +0000 (GMT)


On Mon, 25 Feb 2002, Dean Herington wrote:

> If you're using GHC, take a look at module Readline in the util package
> (http://www.haskell.org/ghc/docs/latest/set/readline.html).  I don't know
> which other Haskell systems support this module.

The annoying thing is the way that terminals generally act on the ASCII
codes so it looks like the delete is working. Readline library sounds like
the much the best option; however if it doesn't work it is possible to
write a function which postprocesses the returned string and acts on the
ASCII codes for backspace, arrow movement, etc, although it's a bit
complex as you've got to get easy deletion of points both immediately
before and after the point you are considering in the string.

___cheers,_dave_________________________________________________________
www.cs.bris.ac.uk/~tweed/|`...heat generated by its microprocessors will
email:tweed@cs.bris.ac.uk|slope upward exponentially, reaching the power
work tel:(0117) 954-5250 |density of a nuclear reactor before 2010'-Intel