Skip to content

Allow haskell-process-path-* to be lists. #1114

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

Merged
merged 1 commit into from
Jan 28, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions haskell-process.el
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ HPTYPE is the result of calling `'haskell-process-type`' function."
nil)
(apply haskell-process-wrapper-function
(list
(cons haskell-process-path-ghci haskell-process-args-ghci)))))
(append (haskell-process-path-to-list haskell-process-path-ghci)
haskell-process-args-ghci)))))
('cabal-repl
(append (list (format "Starting inferior `cabal repl' process using %s ..."
haskell-process-path-cabal)
Expand All @@ -94,7 +95,8 @@ HPTYPE is the result of calling `'haskell-process-type`' function."
(apply haskell-process-wrapper-function
(list
(append
(list haskell-process-path-cabal "repl")
(haskell-process-path-to-list haskell-process-path-cabal)
(list "repl")
haskell-process-args-cabal-repl
(let ((target (haskell-session-target session)))
(if target (list target) nil)))))))
Expand All @@ -105,11 +107,18 @@ HPTYPE is the result of calling `'haskell-process-type`' function."
(apply haskell-process-wrapper-function
(list
(append
(list haskell-process-path-stack "ghci")
(haskell-process-path-to-list haskell-process-path-stack)
(list "ghci")
(let ((target (haskell-session-target session)))
(if target (list target) nil))
haskell-process-args-stack-ghci))))))))

(defun haskell-process-path-to-list (path)
"Convert a path (which may be a string or a list) to a list."
(if (stringp path)
(list path)
path))

(defun haskell-process-make (name)
"Make an inferior Haskell process."
(list (cons 'name name)))
Expand Down