haskell-mode
haskell-mode copied to clipboard
Haskell process command errored with: (wrong-type-argument stringp nil)
The above error happens whenever I try to load a buffer into the haskell interactive process (C-c C-l or haskell-process-load-file). I orginally thought it was an issue with ghc-mod, but now I have that installed so I have no idea how to even diagnose the problem. I have had this problem for quite some time now.
I'm running Arch Linux, GHC 8.2.1 using ghc-static. cabal is installed locally, statically from stack-static.
I have exactly the same problem, running Arch Linux and GHC 8.2.1, Emacs 25.3 and the latest haskell-mode from GitHub
Same here, Mint/Emacs25.
Does the *haskell-process-log* buffer say anything?
What is your haskell-mode configuration?
I don't see any buffer named *haskell-process-log* (do I have to enable it somewhere?) My .emacs file has this for loading haskell-mode:
(add-to-list 'load-path "~/Tools/haskell-mode/")
(require 'haskell-mode-autoloads)
(add-to-list 'Info-default-directory-list "~/Tools/haskell-mode/")
(add-hook 'haskell-mode-hook 'interactive-haskell-mode)
That Tools/haskell-mode is just cloning this repository and running make.
I got it to work by adding this to my .emacs:
(setq haskell-process-type 'stack-ghci)
(setq haskell-process-path-ghci "stack")
However, I had no configuration before. It appears that it doesn't work without stack. I'm not sure why, and it would be nice if there was a better error message than given.
Before, it would just spit the following to *Messages*:
Compiling: Main (s.hs)
Collecting type info for 1 module(s) ...
Haskell process command errored with: (wrong-type-argument stringp nil)
Hello guys,
I've also ran into the same issue and here's what my *haskell-process-log* says
("Starting inferior GHCi process ghci ..." "haskell" nil "ghci" "-ferror-spans")
-> Prelude.putStrLn ""
:set -v1
:set +c
-> :set prompt "\4"
-> :set prompt2 "λ| "
<- GHCi, version 8.2.1: http://www.haskell.org/ghc/ :? for help
<- Prel
<- ude>
Prelude> Prelude> Prelude> Some flags have not been recognized: prompt2, λ|
It seems that :set prompt2 is now called :set prompt-cont.
I have the same problem. This https://github.com/haskell/haskell-mode/pull/1573 might help. As far as I understand until ghc 8.2.2 with -fshow-loaded-modules there is no way to load required into ghci. Please correct me if I'm wrong.
@pvmart your patch works for me! C-c C-l loads successfully now and properly shows warnings (GHC 8.2.2).
@pvmart Thanks for the patch! also working like a charm on my system
with respect to adamse analysis above, I am seeing the same issue but the error message is (error "Unexpected response from haskell process)
I have thus updated #1496
I don't see the original problem on the latest version of haskell-mode so perhaps this issue can be closed?