From b2afa01c52dbe9b945277883b7c377b3963c1374 Mon Sep 17 00:00:00 2001 From: Moritz Kiefer Date: Sun, 15 Mar 2015 10:10:52 +0100 Subject: [PATCH] Wrap session target --- haskell-process.el | 8 +++++--- tests/haskell-process-tests.el | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/haskell-process.el b/haskell-process.el index 64ddd8b3f..e6290ee37 100644 --- a/haskell-process.el +++ b/haskell-process.el @@ -93,9 +93,11 @@ HPTYPE is the result of calling `'haskell-process-type`' function." nil) (apply haskell-process-wrapper-function (list - (cons haskell-process-path-cabal (cons "repl" haskell-process-args-cabal-repl)))) - (let ((target (haskell-session-target session))) - (if target (list target) nil)))) + (append + (list haskell-process-path-cabal "repl") + haskell-process-args-cabal-repl + (let ((target (haskell-session-target session))) + (if target (list target) nil))))))) ('cabal-ghci (append (list (format "Starting inferior cabal-ghci process using %s ..." haskell-process-path-cabal-ghci) diff --git a/tests/haskell-process-tests.el b/tests/haskell-process-tests.el index 1c18b039a..9b03b670c 100644 --- a/tests/haskell-process-tests.el +++ b/tests/haskell-process-tests.el @@ -51,7 +51,7 @@ (haskell-process-compute-process-log-and-command "dummy-session2" 'cabal-repl)))))) (ert-deftest test-haskell-process--with-wrapper-compute-process-log-and-command-cabal-repl () - (should (equal '("Starting inferior `cabal repl' process using cabal ..." "dumses2" nil "nix-shell" "default.nix" "--command" "cabal\\ repl\\ --ghc-option\\=-ferror-spans" "dumdum-session") + (should (equal '("Starting inferior `cabal repl' process using cabal ..." "dumses2" nil "nix-shell" "default.nix" "--command" "cabal\\ repl\\ --ghc-option\\=-ferror-spans\\ dumdum-session") (let ((haskell-process-path-cabal "cabal") (haskell-process-args-cabal-repl '("--ghc-option=-ferror-spans"))) (custom-set-variables '(haskell-process-wrapper-function