Skip to content

Commit 01b6391

Browse files
Refactor nix-shell-ghci support.
1 parent cef77bf commit 01b6391

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

haskell-process.el

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,23 +1075,21 @@ now."
10751075
"-s"
10761076
dir)))
10771077
('nix-shell-ghci
1078-
(haskell-process-log
1079-
(propertize
1080-
(format "Starting inferior nix-shell (ghci) process using %s %s %s %s..."
1081-
haskell-process-path-nix-shell
1082-
haskell-process-args-nix-shell
1083-
"--command"
1084-
haskell-process-path-ghci)
1085-
'face font-lock-comment-face))
1086-
(apply #'start-process
1087-
(append (list (haskell-session-name session)
1088-
nil
1089-
haskell-process-path-nix-shell)
1090-
haskell-process-args-nix-shell
1091-
'("--command")
1092-
(list haskell-process-path-ghci)
1093-
(let ((target (haskell-session-target session)))
1094-
(if target (list target) nil))))))))
1078+
(let ((args (append (list haskell-process-path-nix-shell)
1079+
haskell-process-args-nix-shell
1080+
'("--command")
1081+
(list haskell-process-path-ghci)
1082+
(let ((target (haskell-session-target session)))
1083+
(if target (list target) nil)))))
1084+
(haskell-process-log
1085+
(propertize
1086+
(format "Starting inferior nix-shell (ghci) process using %s..."
1087+
(mapconcat 'identity args " "))
1088+
'face font-lock-comment-face))
1089+
(apply #'start-process
1090+
(append (list (haskell-session-name session)
1091+
nil)
1092+
args)))))))
10951093
(progn (set-process-sentinel (haskell-process-process process) 'haskell-process-sentinel)
10961094
(set-process-filter (haskell-process-process process) 'haskell-process-filter))
10971095
(haskell-process-send-startup process)

0 commit comments

Comments
 (0)