ChatGPT解决这个技术问题 Extra ChatGPT

Emacs Interactive-Haskell repl non-response if either the cabal or working directory set to project directory

I'm running into odd behavior with the Interactive-Haskell repl in emacs. When I source a file, the emacs mini buffer shows a series of interactive prompts:

Start a new project named 'myproject'?
Cabal dir (guessed from myproject.cabal):
Build target (empty for default):
Set current directory:

If I leave either the cabal directory or the current directory to the default value of the project directory, the repl is unresponsive. I get a lambda prompt in the interactive Haskell window, I can type, but when I press enter, it never evaluates. The cursor stays on the same line as if I did not press enter at all.

If I change both of those directories to some path other than my project directory, then the repl behaves normally and evaluates expressions as expected.

Can you post a minimal ~/.emacs file that allows you to reproduce the problem?
Does this problem occur when running in a directory with a 'myproject.cabal'? If so, have you tried running it without the cabal file?
Linking to reported issue: github.com/haskell/haskell-mode/issues/876
I am aware of a potential problem ("stuck-mode") when using evil. If you use evil, please check out github.com/syl20bnr/spacemacs/issues/3271
I've read that this issue as reported in the link posted by @GracjanPolak has been closed by the following pull-request github.com/haskell/haskell-mode/pull/1116/files

K
Kirk Strobeck

This is a known bug. and a good catch!

The pull request https://github.com/haskell/haskell-mode/pull/1116/files solves it.