haskell / haskell/haskell-mode

Problem with haskell process load file on Windows10

Open
#1,503 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
Emacs Lisp
Stars
1.4k
Forks
354
Avg merge
5d 10h
Merged PRs (30d)
2

Description

Platform Information:

- Windows 10
- Haskell Platform 8.0.1
- Emacs 25.1

The problem is weird, when I just want to use `haskell-process-load-file` for a small piece of haskell code like this:

```haskell
module CalcInptType ( Expr (..), Ops (..), Parse ) where

data Expr = Lit { value :: Int }
| Var { variable :: String }
| Op { operate :: Ops
, express1 :: Expr
, express2 :: Expr }
deriving (Eq, Show)

data Ops = Add | Sub | Mul | Div | Mod | Def | Frc
deriving (Eq, Show)

type Parse a b = [a] -> [(b, [a])]
```

Then here goes the error in the `Message` buffer.

```
error in process sentinel: haskell-process-prompt-restart: Wrong type argument: stringp, nil
error in process sentinel: Wrong type argument: stringp, nil
```

This kind of problem only happen on Windows, I checked in Linux and everything goes smoothly.

Then I use the `debug-on-error` to check, here goes the `Backtrace debug buffer`, a large chunk of message...

```
Debugger entered--Lisp error: (wrong-type-argument stringp nil)

string-match("You need to re-run the 'configure' command." nil)

haskell-process-prompt-restart(((name . "haskell") (command-queue [cl-struct-haskell-command (((name . "haskell") (next-error-region # . #) (next-error-locus) (interactive-buffer . #) (current-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (cabal-checksum) (cabal-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (process (name . "haskell") #1 (inferior-process . #) (is-restarting) (current-command . [cl-struct-haskell-command #0 #[257 "\301\302\303\304\305#\"\210\301\306\"\210\301\307\310\"\"\207" [haskell-interactive-prompt2 haskell-process-send-string mapconcat identity ... "\n" ":set prompt \"\4\"" format ":set prompt2 \"%s\""] 7 "\n\n(fn PROCESS)"] #[514 "\300\301\"\205\302\303\"\304\305!\306\307\310\311\312\313!\314\"\315\316%#\210\317\305!\320\321\"\"\262\207" [haskell-process-consume "^*** WARNING: \(.+\) is writable by someone else, IGNORING!$" match-string 1 haskell-session-modify haskell-process-session ignored-files make-byte-code 257 "\301\300B\302\303#\207" vconcat vector [cl-remove-duplicates :test string=] 5 "\n\n(fn FILES)" haskell-interactive-mode-compile-warning format "GHCi is ignoring: %s (run M-x haskell-process-unignore)"] 12 "\n\n(fn PROCESS BUFFER)"] #[514 "\303\304!\305G!8 \205\306P\"\210r\307 q\210\nb)\207" [haskell-process-greetings haskell-process-show-debug-tips haskell-interactive-mode-prompt-start haskell-interactive-mode-echo haskell-process-session random "\nIf I break, you can:\n 1. Restart: M-x haskell-process-restart\n 2. Configure logging: C-h v haskell-process-log (useful for debugging)\n 3. General config: M-x customize-mode\n 4. Hide these tips: C-h v haskell-process-show-debug-tips" haskell-interactive-buffer] 6 "\n\n(fn PROCESS _)"]]) (suggested-imported) (sent-stdin) (evaluating) (session (name . "haskell") (next-error-region # . #) (next-error-locus) (interactive-buffer . #) (current-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (cabal-checksum) (cabal-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") #5))) #0 "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") #[257 "\300A@\301\302AA@\"\"\207" [haskell-process-send-string format ":cd %s"] 6 "\n\n(fn STATE)"] nil #[514 "\300@AA@\"\210\301@\302\303AA@\"\"\207" [haskell-session-set-current-dir haskell-interactive-mode-echo format "Changed directory: %s"] 7 "\n\n(fn STATE _)"]] [cl-struct-haskell-command (((name . "haskell") (next-error-region # . #) (next-error-locus) (interactive-buffer . #) (current-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (cabal-checksum) (cabal-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (process (name . "haskell") #1 (inferior-process . #) (is-restarting) (current-command . [cl-struct-haskell-command #0 #[257 "\301\302\303\304\305#\"\210\301\306\"\210\301\307\310\"\"\207" [haskell-interactive-prompt2 haskell-process-send-string mapconcat identity ... "\n" ":set prompt \"\4\"" format ":set prompt2 \"%s\""] 7 "\n\n(fn PROCESS)"] #[514 "\300\301\"\205\302\303\"\304\305!\306\307\310\311\312\313!\314\"\315\316%#\210\317\305!\320\321\"\"\262\207" [haskell-process-consume "^*** WARNING: \(.+\) is writable by someone else, IGNORING!$" match-string 1 haskell-session-modify haskell-process-session ignored-files make-byte-code 257 "\301\300B\302\303#\207" vconcat vector [cl-remove-duplicates :test string=] 5 "\n\n(fn FILES)" haskell-interactive-mode-compile-warning format "GHCi is ignoring: %s (run M-x haskell-process-unignore)"] 12 "\n\n(fn PROCESS BUFFER)"] #[514 "\303\304!\305G!8 \205\306P\"\210r\307 q\210\nb)\207" [haskell-process-greetings haskell-process-show-debug-tips haskell-interactive-mode-prompt-start haskell-interactive-mode-echo haskell-process-session random "\nIf I break, you can:\n 1. Restart: M-x haskell-process-restart\n 2. Configure logging: C-h v haskell-process-log (useful for debugging)\n 3. General config: M-x customize-mode\n 4. Hide these tips: C-h v haskell-process-show-debug-tips" haskell-interactive-buffer] 6 "\n\n(fn PROCESS _)"]]) (suggested-imported) (sent-stdin) (evaluating) (session (name . "haskell") (next-error-region # . #) (next-error-locus) (interactive-buffer . #) (current-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (cabal-checksum) (cabal-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") #5))) #0 "load \"g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/CalcInpt.hs\"" nil #) #[257 "\300A@\301\302AA@\"\"\207" [haskell-process-send-string format ":%s"] 6 "\n\n(fn STATE)"] #[514 "\300A@\301#\207" [haskell-process-live-build nil] 6 "\n\n(fn STATE BUFFER)"] #[514 "\300@A@AAA@AAAA@%\207" [haskell-process-load-complete] 8 "\n\n(fn STATE RESPONSE)"]]) (inferior-process . #) (is-restarting) (current-command . [cl-struct-haskell-command #0 #[257 "\301\302\303\304\305#\"\210\301\306\"\210\301\307\310\"\"\207" [haskell-interactive-prompt2 haskell-process-send-string mapconcat identity ("Prelude.putStrLn \"\"" ":set -v1" ":set +c") "\n" ":set prompt \"\4\"" format ":set prompt2 \"%s\""] 7 "\n\n(fn PROCESS)"] #[514 "\300\301\"\205\302\303\"\304\305!\306\307\310\311\312\313!\314\"\315\316%#\210\317\305!\320\321\"\"\262\207" [haskell-process-consume "^*** WARNING: \(.+\) is writable by someone else, IGNORING!$" match-string 1 haskell-session-modify haskell-process-session ignored-files make-byte-code 257 "\301\300B\302\303#\207" vconcat vector [cl-remove-duplicates :test string=] 5 "\n\n(fn FILES)" haskell-interactive-mode-compile-warning format "GHCi is ignoring: %s (run M-x haskell-process-unignore)"] 12 "\n\n(fn PROCESS BUFFER)"] #[514 "\303\304!\305G!8 \205\306P\"\210r\307 q\210\nb)\207" [haskell-process-greetings haskell-process-show-debug-tips haskell-interactive-mode-prompt-start haskell-interactive-mode-echo haskell-process-session random "\nIf I break, you can:\n 1. Restart: M-x haskell-process-restart\n 2. Configure logging: C-h v haskell-process-log (useful for debugging)\n 3. General config: M-x customize-mode\n 4. Hide these tips: C-h v haskell-process-show-debug-tips" haskell-interactive-buffer] 6 "\n\n(fn PROCESS _)"]]) (suggested-imported) (sent-stdin) (evaluating) (session (name . "haskell") (next-error-region # . #) (next-error-locus) (interactive-buffer . #) (current-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (cabal-checksum) (cabal-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (process (name . "haskell") (command-queue [cl-struct-haskell-command (((name . "haskell") (next-error-region # . #) (next-error-locus) (interactive-buffer . #) (current-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (cabal-checksum) (cabal-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") #2) #0 "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") #[257 "\300A@\301\302AA@\"\"\207" [haskell-process-send-string format ":cd %s"] 6 "\n\n(fn STATE)"] nil #[514 "\300@AA@\"\210\301@\302\303AA@\"\"\207" [haskell-session-set-current-dir haskell-interactive-mode-echo format "Changed directory: %s"] 7 "\n\n(fn STATE _)"]] [cl-struct-haskell-command (((name . "haskell") (next-error-region # . #) (next-error-locus) (interactive-buffer . #) (current-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (cabal-checksum) (cabal-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") #2) #0 "load \"g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/CalcInpt.hs\"" nil #) #[257 "\300A@\301\302AA@\"\"\207" [haskell-process-send-string format ":%s"] 6 "\n\n(fn STATE)"] #[514 "\300A@\301#\207" [haskell-process-live-build nil] 6 "\n\n(fn STATE BUFFER)"] #[514 "\300@A@AAA@AAAA@%\207" [haskell-process-load-complete] 8 "\n\n(fn STATE RESPONSE)"]]) (inferior-process . #) (is-restarting) (current-command . [cl-struct-haskell-command #0 #[257 "\301\302\303\304\305#\"\210\301\306\"\210\301\307\310\"\"\207" [haskell-interactive-prompt2 haskell-process-send-string mapconcat identity ("Prelude.putStrLn \"\"" ":set -v1" ":set +c") "\n" ":set prompt \"\4\"" format ":set prompt2 \"%s\""] 7 "\n\n(fn PROCESS)"] #[514 "\300\301\"\205*\302\303\"\304\305!\306\307\310\311\312\313!\314\"\315\316%#\210\317\305!\320\321\"\"\262\207" [haskell-process-consume "^*** WARNING: \(.+\) is writable by someone else, IGNORING!$" match-string 1 haskell-session-modify haskell-process-session ignored-files make-byte-code 257 "\301\300B\302\303#\207" vconcat vector [cl-remove-duplicates :test string=] 5 "\n\n(fn FILES)" haskell-interactive-mode-compile-warning format "GHCi is ignoring: %s (run M-x haskell-process-unignore)"] 12 "\n\n(fn PROCESS BUFFER)"] #[514 "\303\304!\305G!8 \205\306P\"\210r\307 q\210\nb)\207" [haskell-process-greetings haskell-process-show-debug-tips haskell-interactive-mode-prompt-start haskell-interactive-mode-echo haskell-process-session random "\nIf I break, you can:\n 1. Restart: M-x haskell-process-restart\n 2. Configure logging: C-h v haskell-process-log (useful for debugging)\n 3. General config: M-x customize-mode\n 4. Hide these tips: C-h v haskell-process-show-debug-tips" haskell-interactive-buffer] 6 "\n\n(fn PROCESS _)"]]) (suggested-imported) (sent-stdin) (evaluating) #1))))

run-hook-with-args(haskell-process-prompt-restart ((name . "haskell") (command-queue [cl-struct-haskell-command (((name . "haskell") (next-error-region # . #) (next-error-locus) (interactive-buffer . #) (current-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (cabal-checksum) (cabal-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (process (name . "haskell") #1 (inferior-process . #) (is-restarting) (current-command . [cl-struct-haskell-command #0 #[257 "\301\302\303\304\305#\"\210\301\306\"\210\301\307\310\"\"\207" [haskell-interactive-prompt2 haskell-process-send-string mapconcat identity ... "\n" ":set prompt \"\4\"" format ":set prompt2 \"%s\""] 7 "\n\n(fn PROCESS)"] #[514 "\300\301\"\205\302\303\"\304\305!\306\307\310\311\312\313!\314\"\315\316%#\210\317\305!\320\321\"\"\262\207" [haskell-process-consume "^*** WARNING: \(.+\) is writable by someone else, IGNORING!$" match-string 1 haskell-session-modify haskell-process-session ignored-files make-byte-code 257 "\301\300B\302\303#\207" vconcat vector [cl-remove-duplicates :test string=] 5 "\n\n(fn FILES)" haskell-interactive-mode-compile-warning format "GHCi is ignoring: %s (run M-x haskell-process-unignore)"] 12 "\n\n(fn PROCESS BUFFER)"] #[514 "\303\304!\305G!8 \205\306P\"\210r\307 q\210\nb)\207" [haskell-process-greetings haskell-process-show-debug-tips haskell-interactive-mode-prompt-start haskell-interactive-mode-echo haskell-process-session random "\nIf I break, you can:\n 1. Restart: M-x haskell-process-restart\n 2. Configure logging: C-h v haskell-process-log (useful for debugging)\n 3. General config: M-x customize-mode\n 4. Hide these tips: C-h v haskell-process-show-debug-tips" haskell-interactive-buffer] 6 "\n\n(fn PROCESS _)"]]) (suggested-imported) (sent-stdin) (evaluating) (session (name . "haskell") (next-error-region # . #) (next-error-locus) (interactive-buffer . #) (current-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (cabal-checksum) (cabal-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") #5))) #0 "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") #[257 "\300A@\301\302AA@\"\"\207" [haskell-process-send-string format ":cd %s"] 6 "\n\n(fn STATE)"] nil #[514 "\300@AA@\"\210\301@\302\303AA@\"\"\207" [haskell-session-set-current-dir haskell-interactive-mode-echo format "Changed directory: %s"] 7 "\n\n(fn STATE _)"]] [cl-struct-haskell-command (((name . "haskell") (next-error-region # . #) (next-error-locus) (interactive-buffer . #) (current-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (cabal-checksum) (cabal-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (process (name . "haskell") #1 (inferior-process . #) (is-restarting) (current-command . [cl-struct-haskell-command #0 #[257 "\301\302\303\304\305#\"\210\301\306\"\210\301\307\310\"\"\207" [haskell-interactive-prompt2 haskell-process-send-string mapconcat identity ... "\n" ":set prompt \"\4\"" format ":set prompt2 \"%s\""] 7 "\n\n(fn PROCESS)"] #[514 "\300\301\"\205\302\303\"\304\305!\306\307\310\311\312\313!\314\"\315\316%#\210\317\305!\320\321\"\"\262\207" [haskell-process-consume "^*** WARNING: \(.+\) is writable by someone else, IGNORING!$" match-string 1 haskell-session-modify haskell-process-session ignored-files make-byte-code 257 "\301\300B\302\303#\207" vconcat vector [cl-remove-duplicates :test string=] 5 "\n\n(fn FILES)" haskell-interactive-mode-compile-warning format "GHCi is ignoring: %s (run M-x haskell-process-unignore)"] 12 "\n\n(fn PROCESS BUFFER)"] #[514 "\303\304!\305G!8 \205\306P\"\210r\307 q\210\nb)\207" [haskell-process-greetings haskell-process-show-debug-tips haskell-interactive-mode-prompt-start haskell-interactive-mode-echo haskell-process-session random "\nIf I break, you can:\n 1. Restart: M-x haskell-process-restart\n 2. Configure logging: C-h v haskell-process-log (useful for debugging)\n 3. General config: M-x customize-mode\n 4. Hide these tips: C-h v haskell-process-show-debug-tips" haskell-interactive-buffer] 6 "\n\n(fn PROCESS _)"]]) (suggested-imported) (sent-stdin) (evaluating) (session (name . "haskell") (next-error-region # . #) (next-error-locus) (interactive-buffer . #) (current-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (cabal-checksum) (cabal-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") #5))) #0 "load \"g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/CalcInpt.hs\"" nil #) #[257 "\300A@\301\302AA@\"\"\207" [haskell-process-send-string format ":%s"] 6 "\n\n(fn STATE)"] #[514 "\300A@\301#\207" [haskell-process-live-build nil] 6 "\n\n(fn STATE BUFFER)"] #[514 "\300@A@AAA@AAAA@%\207" [haskell-process-load-complete] 8 "\n\n(fn STATE RESPONSE)"]]) (inferior-process . #) (is-restarting) (current-command . [cl-struct-haskell-command #0 #[257 "\301\302\303\304\305#\"\210\301\306\"\210\301\307\310\"\"\207" [haskell-interactive-prompt2 haskell-process-send-string mapconcat identity ("Prelude.putStrLn \"\"" ":set -v1" ":set +c") "\n" ":set prompt \"\4\"" format ":set prompt2 \"%s\""] 7 "\n\n(fn PROCESS)"] #[514 "\300\301\"\205\302\303\"\304\305!\306\307\310\311\312\313!\314\"\315\316%#\210\317\305!\320\321\"\"\262\207" [haskell-process-consume "^*** WARNING: \(.+\) is writable by someone else, IGNORING!$" match-string 1 haskell-session-modify haskell-process-session ignored-files make-byte-code 257 "\301\300B\302\303#\207" vconcat vector [cl-remove-duplicates :test string=] 5 "\n\n(fn FILES)" haskell-interactive-mode-compile-warning format "GHCi is ignoring: %s (run M-x haskell-process-unignore)"] 12 "\n\n(fn PROCESS BUFFER)"] #[514 "\303\304!\305G!8 \205\306P\"\210r\307 q\210\nb)\207" [haskell-process-greetings haskell-process-show-debug-tips haskell-interactive-mode-prompt-start haskell-interactive-mode-echo haskell-process-session random "\nIf I break, you can:\n 1. Restart: M-x haskell-process-restart\n 2. Configure logging: C-h v haskell-process-log (useful for debugging)\n 3. General config: M-x customize-mode\n 4. Hide these tips: C-h v haskell-process-show-debug-tips" haskell-interactive-buffer] 6 "\n\n(fn PROCESS _)"]]) (suggested-imported) (sent-stdin) (evaluating) (session (name . "haskell") (next-error-region # . #) (next-error-locus) (interactive-buffer . #) (current-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (cabal-checksum) (cabal-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (process (name . "haskell") (command-queue [cl-struct-haskell-command (((name . "haskell") (next-error-region # . #) (next-error-locus) (interactive-buffer . #) (current-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (cabal-checksum) (cabal-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") #2) #0 "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") #[257 "\300A@\301\302AA@\"\"\207" [haskell-process-send-string format ":cd %s"] 6 "\n\n(fn STATE)"] nil #[514 "\300@AA@\"\210\301@\302\303AA@\"\"\207" [haskell-session-set-current-dir haskell-interactive-mode-echo format "Changed directory: %s"] 7 "\n\n(fn STATE _)"]] [cl-struct-haskell-command (((name . "haskell") (next-error-region # . #) (next-error-locus) (interactive-buffer . #) (current-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") (cabal-checksum) (cabal-dir . "g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/") #2) #0 "load \"g:/original_ddisk/Programming/haskell/solution-haskell-craft-of-FP/CalcInpt.hs\"" nil #) #[257 "\300A@\301\302AA@\"\"\207" [haskell-process-send-string format ":%s"] 6 "\n\n(fn STATE)"] #[514 "\300A@\301#\207" [haskell-process-live-build nil] 6 "\n\n(fn STATE BUFFER)"] #[514 "\300@A@AAA@AAAA@%\207" [haskell-process-load-complete] 8 "\n\n(fn STATE RESPONSE)"]]) (inferior-process . #) (is-restarting) (current-command . [cl-struct-haskell-command #0 #[257 "\301\302\303\304\305#\"\210\301\306\"\210\301\307\310\"\"\207" [haskell-interactive-prompt2 haskell-process-send-string mapconcat identity ("Prelude.putStrLn \"\"" ":set -v1" ":set +c") "\n" ":set prompt \"\4\"" format ":set prompt2 \"%s\""] 7 "\n\n(fn PROCESS)"] #[514 "\300\301\"\205*\302\303\"\304\305!\306\307\310\311\312\313!\314\"\315\316%#\210\317\305!\320\321\"\"\262\207" [haskell-process-consume "^*** WARNING: \(.+\) is writable by someone else, IGNORING!$" match-string 1 haskell-session-modify haskell-process-session ignored-files make-byte-code 257 "\301\300B\302\303#\207" vconcat vector [cl-remove-duplicates :test string=] 5 "\n\n(fn FILES)" haskell-interactive-mode-compile-warning format "GHCi is ignoring: %s (run M-x haskell-process-unignore)"] 12 "\n\n(fn PROCESS BUFFER)"] #[514 "\303\304!\305G!8 \205\306P\"\210r\307 q\210\nb)\207" [haskell-process-greetings haskell-process-show-debug-tips haskell-interactive-mode-prompt-start haskell-interactive-mode-echo haskell-process-session random "\nIf I break, you can:\n 1. Restart: M-x haskell-process-restart\n 2. Configure logging: C-h v haskell-process-log (useful for debugging)\n 3. General config: M-x customize-mode\n 4. Hide these tips: C-h v haskell-process-show-debug-tips" haskell-interactive-buffer] 6 "\n\n(fn PROCESS _)"]]) (suggested-imported) (sent-stdin) (evaluating) #1))))

haskell-process-sentinel(# "exited abnormally with code 66\n")
```

Thank you for your `haskell-mode`, I like it very much, I hope I can help here.
(Sorry for my lame English since I am not native speaker... This is also my first ISSUE submitted. : ) )

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.