[Haskell-beginners] ghci interactive behaviour.

Daniel Fischer daniel.is.fischer at web.de
Wed Aug 20 17:35:17 EDT 2008


Am Mittwoch, 20. August 2008 23:23 schrieb Venkat Ramanan:
> Hi all,
>
> I'm just beginning to learn haskell.
>
> I see some strange behaviour in ghci. Don't know if it is related to
> readline.
>
> Behaviour-1:
> Lets say after we enter an expression, we just hit "Enter" 3 times to
> insert 3 empty lines. To get back the expression, we need to do <C-p> ( or
> up-arrow ) 3 times.
>
> In other words, the empty lines seem to be stored in the history. Bash (
> and tcsh ) seem to save only non-empty lines.
>
> Behaviour-2:
> It doesn't seem to do pruning of duplicates. If the same expression is
> entered twice, both of them are stored in the history instead of just one.
> Bash uses environmental variables (HISTCONTROL and HISTIGNORE ) to modify
> this behavior.
>
> Is there a way to get saner behaviour like in bash?
>
> I'm using ghc-6.8.2 which comes with ubuntu 8.04.
>
> Thanks,
> Venkat.

#1 is fixed in 6.8.3, but duplicates aren't eliminated there either.



More information about the Beginners mailing list