[Haskell-cafe] Re: System.Console.Readline stifleHistory Question

Daniel Kahlenberg d.kahlenberg at googlemail.com
Fri Jun 27 06:53:21 EDT 2008


I detected it was my own fail: I was misleaded by the creation of the
persistence file, which doesn't result from Readline.hs but simply
from the rlwrap utility I earlier piped in before the ghci call. For
those interested, the answer to the original question as usual from
the man page: option --histsize N for rlwrap does the job.

Maybe for a later discussion of using readline or some compatibility
library instead of the rlwrap tool on ms windows systems I will post
an extra message with a link.


---------- Forwarded message ----------
From: Daniel Kahlenberg <d.kahlenberg at googlemail.com>
Date: 2008/6/27
Subject: System.Console.Readline stifleHistory Question
To: haskell-cafe at haskell.org

Hello all,

I'm learning Haskell and so very likely will have advantages from the
history persistence feature added to the ghci haskell interpreter. It
drives very well in my setup (the history file is growing and used),
but I wanted to increase the number of saved history entries and now
my question concerning ghci: In the ticket
(http://hackage.haskell.org/trac/ghc/ticket/2050) associated with the
feature, there's written that one can call stifleHistory in its
dotghci file. Have done it like:
 :m +System.Console.Readline
 stifleHistory 300
 :m -System.Console.Readline

but now my ghci.exe says:

Could not find module `System.Console.Readline':
 Use -v to see a list of the files searched for.

<interactive>:1:0: Not in scope: `stifleHistory'

`uname -r`:
MINGW32_NT-5.1 CLE10 1.0.11(0.46/3/2) 2007-01-12 12:05 i686 Msys

Do you have an idea, where I'm wrong?

I'm starting my ghci session from zsh shell, provided by cygwin,
wrapped in a tty emulator:
$Drive\puttycyg\putty.exe -cygterm $Drive\zsh\bin\zsh.exe -p -c
'PATH=/cygdrive/h/zsh/bin:$PATH HOME=/cygdrive/h/.homedir rlwrap
$(which ghcii.sh) -package-conf
$Drive/.homedir/ghc/i386-mingw32-6.8.3/package.conf -read-dot-ghci'

So I did not expect Readline not to work, but maybe the ghc system
only sees the result from `uname -r` above??

Bye, Daniel.

More information about the Haskell-Cafe mailing list