Emacs hangs in haskell-mode with inferior-haskell-load-file call

后端 未结 4 1370
[愿得一人]
[愿得一人] 2021-02-19 21:26

When in a Haskell file, I use C-c C-l to run the command inferior-haskell-load-file which is intended to load the current file into the GHCI interprete

4条回答
  •  说谎
    说谎 (楼主)
    2021-02-19 21:59

    Old question, but as I just ran into this today, I wanted to share how to actually customize comint-prompt-regexp since I had to figure it out.

    This customization will recognize λ> prompts, or actually any single character before >), but it doesn't break the existing regex. In your .emacs:

    (load-library "inf-haskell")
    
    (defun my-inf-haskell-hook ()
      (setq comint-prompt-regexp 
            (concat comint-prompt-regexp "\\|^.> ")))
    
    (add-to-list 'inferior-haskell-mode-hook 'my-inf-haskell-hook)
    

    You can add more dots to "\\|^.> " to recognize a longer prompt, but I wanted to keep it fixed-length for simplicity.

提交回复
热议问题