ghci REPL output under Haskell Platform on Mac OS X

View: New views
3 Messages — Rating Filter:   Alert me  

ghci REPL output under Haskell Platform on Mac OS X

by Mark Lentczner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

My ghci installation has a very annoying behavior: When it takes  
input, the result is displayed on the same line as the input,  
overwriting the prompt and input.  Viz.:

        [1015] : ghci
        GHCi, version 6.10.4: http://www.haskell.org/ghc/  :? for help
        Loading package ghc-prim ... linking ... done.
        Loading package integer ... linking ... done.
        Loading package base ... linking ... done.
        7relude> 3 + 4
        Prelude>

Note the 7 that overwrites the P in Prelude.

I have had several prior versions of ghci installed, most recently  
6.10.1, and they never had this problem. (In other words, I saw:

        Prelude> 3 + 4
        7
        Prelude>

Those prior gchi's were installed from the GHC binaries. Most recently  
I decided to give Haskell Platform a try, and I installed that. That  
is the point at which this behavior started.

My environment:

        Haskell Platform 2009.2.0.2
        GHC 6.10.4 (installed w/Haskell Platform)
        Mac OS X 10.6.1

Oddly, I have GHC 6.10.4 installed from GHC binaries on a Mac OS X  
10.5 machine at work, and the newline behavior is correct. So the  
issue could be Haskell Platform vs. GHC installs... or it could be  
10.5  vs. 10.6

Anyone seen anything like this?

        - Mark



_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: ghci REPL output under Haskell Platform on Mac OS X

by Henning Thielemann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mark Lentczner schrieb:

> My ghci installation has a very annoying behavior: When it takes input,
> the result is displayed on the same line as the input, overwriting the
> prompt and input.  Viz.:
>
>     [1015] : ghci
>     GHCi, version 6.10.4: http://www.haskell.org/ghc/  :? for help
>     Loading package ghc-prim ... linking ... done.
>     Loading package integer ... linking ... done.
>     Loading package base ... linking ... done.
>     7relude> 3 + 4
>     Prelude>
>
> Note the 7 that overwrites the P in Prelude.
>
> I have had several prior versions of ghci installed, most recently
> 6.10.1, and they never had this problem. (In other words, I saw:
>
>     Prelude> 3 + 4
>     7
>     Prelude>

I had a similar problem with Haskeline and an too old version of
terminfo. I assume Haskeline is used by your GHC instead of readline.
Now I'm using self-compiled ghci-haskeline.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: ghci REPL output under Haskell Platform on Mac OS X

by Mark Lentczner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Nov 1, 2009, at 1:05 PM, Henning Thielemann wrote:

> I had a similar problem with Haskeline and an too old version of
> terminfo. I assume Haskeline is used by your GHC instead of readline.

Aha! That led me to find it: I had TERM set to 'ansi'. ghci +  
Haskeline works find if TERM is set to any of rxvt, vt52, vt100, vt102  
or xterm. Don't know what in terminfo Haskeline is relying on, but  
'ansi' doesn't have it!

        - Mark

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe