looking for System.Console.Readline example

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Tue Dec 2 15:34:58 EST 2003


Martin Norbäck wrote:

> What do you mean? Readline is for editing one line. 

well, yes and no. sure its built-in history functions
precisely do help editing a sequence of lines?
as used in bash, ghci, hugs?


I now have something that works (bottom of this file):

http://theo1.informatik.uni-leipzig.de/cgi-bin/cvsweb/autotool/Exp/Loop.hs?rev=1.3


Still I think it would be nice to have

Readline.getContents :: IO String

that just returns the lazy input list
(line by line, as getContents would do).

It's just another kind of line buffering,
and this should be transparent to the application.
(Of course, it couldn't change the prompt symbol then,
but I could live with that).

-- 
-- Johannes Waldmann,  Tel/Fax: (0341) 3076 6479 / 6480 --
------ http://www.imn.htwk-leipzig.de/~waldmann/ ---------




More information about the Haskell mailing list