haskell-mode icon indicating copy to clipboard operation
haskell-mode copied to clipboard

Quick escape from interactive mode

Open shanemikel opened this issue 9 years ago • 7 comments

I'm wondering why, when prompted for a restart of ghci process, haskell-mode doesn't seem content with the answer: no.

shanemikel avatar May 26 '16 08:05 shanemikel

Do you mean the The Haskell process haskell' has died. Restart? (y, n, l: show process log)? I believe it's by design that n` doesn't do anything. What do you think it should do?

fice-t avatar May 26 '16 17:05 fice-t

Let me clarify: when I input an 'n', the question keeps popping back up. It also steals focus, so once it happens, I can't do anything, really, and it forces me to quit Emacs.

Also, this tends to happen when stack has to build some new dependencies or something. My guess is haskell-mode expects a response and gives a timeout too early. If this is the case, does it really make sense to expect a specific result in a magic amount of time? It seems that the right way to know if the process is dead, is by querying the actual system for the PID. (Is this implemented this way because you want to save users that get into an infinite loop in the repl?)

shanemikel avatar Jun 24 '16 04:06 shanemikel

I believe I've figured this out: I had the hoogle thing set up, so it only happens when the point is on a named symbol (a typed thing)...

shanemikel avatar Dec 30 '16 06:12 shanemikel

This is an issue with the latest version as of now.

jaseemabid avatar May 31 '17 04:05 jaseemabid

I am not sure: is there a solution? What's the proper way to quit Haskell? To repeat: when I enter ":q" at the prompt in the haskell buffer, I get a question about restarting. If I answer "n", the question reappears if I press Enter in haskell. Besides, when I envoke (close-buffer) on the haskell buffer, I am asked "Kill the whole session?", and I have no idea what this means. Why can't I quit Haskell without any additional questions and possibly close the haskell buffer?

EvgenyMakarov avatar Apr 07 '20 17:04 EvgenyMakarov

What's the proper way to quit Haskell?

Killing the buffer should be the idiomatic way.

To repeat: when I enter ":q" at the prompt in the haskell buffer, I get a question about restarting. If I answer "n", the question reappears if I press Enter in haskell.

Yeah, agree that's annoying. I'll take a look if I get a chance.

Besides, when I envoke (close-buffer) on the haskell buffer, I am asked "Kill the whole session?", and I have no idea what this means. Why can't I quit Haskell without any additional questions and possibly close the haskell buffer?

I also find this annoying, so I've changed it: that particular prompt question is no longer asked by default, but it's still possible for those who want it. See c3d3e23.

purcell avatar Apr 07 '20 23:04 purcell

PS. It looks like you can customize haskell-process-suggest-restart to nil to suppress all the prompts.

purcell avatar Apr 08 '20 02:04 purcell