logo       

Re: GHCi 6.0.1 on Mac OS X + emacs hangs; solution and patch: msg#00046

lang.haskell.glasgow.bugs

Subject: Re: GHCi 6.0.1 on Mac OS X + emacs hangs; solution and patch


On Friday, August 22, 2003, at 10:37 PM, Gregory Wright wrote:


Hi,

Using GHCi 6.0.1 on Mac OS X with emacs (using the emacs mode files
from the haskell.org website) fails. Emacs eventually hangs,
but the first symptom is a failure to return the GHCi prompt.

Hugs still works with emacs. I also checked the comint-prompt-regexp,
usually the cause of these problems. It is OK and fiddling with it to make
it more obviously OK for a test case didn't help.

The ghci buffer displays only:

___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.0.1, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.

Loading package base ... linking ... done.


Attempting to load anything from the buffer with source code
wedges emacs solidly.



The problem is caused by InteractiveUI.hs. It suppresses the prompt when ghci's stdin is
not a tty (is_tty is false). Is there ever a reason to do this? emacs needs the prompt to determine
when ghci's output has ended. If it never sees the prompt it just waits forever.

In the windows case, the prompt is always left on because isa_tty may return false for file
descriptors that are in fact ttys. Why not do this for all cases? A patch that implements this is attached.

Best Wishes,
Greg


Attachment: patch-InteractiveUI.hs
Description: Binary data



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise