From 6808db93ff95e6db06f74e962d3e02ae4b28b90f Mon Sep 17 00:00:00 2001 From: chendianbuji Date: Sun, 18 Apr 2021 09:58:21 +0800 Subject: [PATCH] enable to customize between cabal repl and cabal new-repl --- haskell-customize.el | 8 ++++++++ haskell-process.el | 2 +- inf-haskell.el | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/haskell-customize.el b/haskell-customize.el index f2c12cd7c..f2b49345a 100644 --- a/haskell-customize.el +++ b/haskell-customize.el @@ -137,6 +137,14 @@ which will be prepended to `haskell-process-args-cabal-repl'." :group 'haskell-interactive :type '(choice string (repeat string))) +(defcustom haskell-process-cabal-repl-command + 'repl + "The repl command for starting ghci with cabal. +This can either be repl or new-repl." + :group 'haskell-interactive + :type '(choice (const repl) + (const new-repl))) + (defcustom haskell-process-path-stack "stack" "The path for starting stack. diff --git a/haskell-process.el b/haskell-process.el index 2ca131f46..571e4aea3 100644 --- a/haskell-process.el +++ b/haskell-process.el @@ -95,7 +95,7 @@ HPTYPE is the result of calling `'haskell-process-type`' function." (list (append (haskell-process-path-to-list haskell-process-path-cabal) - (list "repl") + (list (symbol-name haskell-process-cabal-repl-command)) haskell-process-args-cabal-repl (let ((target (haskell-session-target session))) (if target (list target) nil))))))) diff --git a/inf-haskell.el b/inf-haskell.el index e62b6ed86..43360f77d 100644 --- a/inf-haskell.el +++ b/inf-haskell.el @@ -62,7 +62,7 @@ directory structure." haskell-process-path-ghci (list haskell-process-path-ghci)) haskell-process-args-ghci)))) - ('cabal-repl `(,haskell-process-path-cabal "repl" ,@haskell-process-args-cabal-repl)) + ('cabal-repl `(,haskell-process-path-cabal (symbol-name ,haskell-process-cabal-repl-command) ,@haskell-process-args-cabal-repl)) ('stack-ghci `(,haskell-process-path-stack "ghci" ,@haskell-process-args-stack-ghci)))) (defconst inferior-haskell-info-xref-re