Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Haskell process command errored with: (wrong-type-argument stringp nil) #1569

Open
iitalics opened this issue Oct 26, 2017 · 11 comments
Open

Comments

@iitalics
Copy link

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.

@manufactory
Copy link

I have exactly the same problem, running Arch Linux and GHC 8.2.1, Emacs 25.3 and the latest haskell-mode from GitHub

@identicalsnowflake
Copy link

Same here, Mint/Emacs25.

@ivan-m
Copy link
Contributor

ivan-m commented Nov 1, 2017

Does the *haskell-process-log* buffer say anything?

What is your haskell-mode configuration?

@identicalsnowflake
Copy link

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.

@iitalics
Copy link
Author

iitalics commented Nov 2, 2017

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)

@emptylambda
Copy link

emptylambda commented Nov 15, 2017

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, λ| 

@adamse
Copy link
Contributor

adamse commented Nov 17, 2017

It seems that :set prompt2 is now called :set prompt-cont.

@pvmart
Copy link
Contributor

pvmart commented Nov 23, 2017

I have the same problem. This #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.

@identicalsnowflake
Copy link

@pvmart your patch works for me! C-c C-l loads successfully now and properly shows warnings (GHC 8.2.2).

@emptylambda
Copy link

@pvmart Thanks for the patch! also working like a charm on my system

@GeorgeCo
Copy link

GeorgeCo commented Aug 11, 2018

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants