Skip to content

Commit 8fd06c8

Browse files
committed
Merge pull request #480 from gracjan/pr-remove-cabal-dev
Remove all mentions of cabal-dev.
2 parents f861b6c + 20f8c7c commit 8fd06c8

File tree

6 files changed

+4
-75
lines changed

6 files changed

+4
-75
lines changed

haskell-customize.el

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Used for locating additional package data files.")
4444
(defcustom haskell-process-type
4545
'auto
4646
"The inferior Haskell process type to use."
47-
:type '(choice (const auto) (const ghci) (const cabal-repl) (const cabal-dev) (const cabal-ghci))
47+
:type '(choice (const auto) (const ghci) (const cabal-repl) (const cabal-ghci))
4848
:group 'haskell-interactive)
4949

5050
(defcustom haskell-process-wrapper-function
@@ -103,12 +103,6 @@ a per-project basis."
103103
:group 'haskell-interactive
104104
:type '(choice string (repeat string)))
105105

106-
(defcustom haskell-process-path-cabal-dev
107-
"cabal-dev"
108-
"The path for starting cabal-dev."
109-
:group 'haskell-interactive
110-
:type '(choice string (repeat string)))
111-
112106
(defcustom haskell-process-args-ghci
113107
'("-ferror-spans")
114108
"Any arguments for starting ghci."

haskell-load.el

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,7 @@ actual Emacs buffer of the module being loaded."
204204
(cl-ecase (haskell-process-type)
205205
('ghci haskell-process-path-cabal)
206206
('cabal-repl haskell-process-path-cabal)
207-
('cabal-ghci haskell-process-path-cabal)
208-
('cabal-dev haskell-process-path-cabal-dev))
207+
('cabal-ghci haskell-process-path-cabal))
209208
(cl-caddr state)))))
210209

211210
:live
@@ -247,8 +246,7 @@ actual Emacs buffer of the module being loaded."
247246
:app-name (cl-ecase (haskell-process-type)
248247
('ghci haskell-process-path-cabal)
249248
('cabal-repl haskell-process-path-cabal)
250-
('cabal-ghci haskell-process-path-cabal)
251-
('cabal-dev haskell-process-path-cabal-dev))
249+
('cabal-ghci haskell-process-path-cabal))
252250
:app-icon haskell-process-logo)))))))))
253251

254252
(defun haskell-process-echo-load-message (process buffer echo-in-repl th)

haskell-modules.el

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ If DONTCREATE is non-nil don't create a new session."
7171
(let ((modules (shell-command-to-string
7272
(format "%s | %s | %s"
7373
(cond
74-
((eq 'cabal-dev (haskell-process-type))
75-
(if (or (not dontcreate) session)
76-
(format "cabal-dev -s %s/cabal-dev ghc-pkg dump"
77-
(haskell-session-cabal-dir session))
78-
"echo ''"))
7974
((haskell-sandbox-exists-p session)
8075
(concat "ghc-pkg dump -f "
8176
(shell-quote-argument (haskell-sandbox-pkgdb session))))

haskell-package.el

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,6 @@
2929

3030
(require 'cl-lib)
3131

32-
;; Dynamically scoped variables.
33-
;; TODO What actually sets this?
34-
(defvar haskell-config-use-cabal-dev)
35-
36-
;; (defun haskell-package-conf-path-get (&optional project)
37-
;; "Gets the user conf or the cabal-dev conf. Get the global conf elsewhere."
38-
;; (if haskell-config-use-cabal-dev
39-
;; (if project
40-
;; (let* ((cabal-path (haskell-project-cabal-dir project)))
41-
;; (format "%scabal-dev/packages-%s.conf/"
42-
;; (if (string-match "/$" cabal-path)
43-
;; cabal-path
44-
;; (concat cabal-path "/"))
45-
;; (haskell-ghc-version)))
46-
;; (haskell-package-conf-user-path-get))
47-
;; (haskell-package-conf-user-path-get)))
48-
4932
(defun haskell-package-conf-user-path-get ()
5033
"Get the user conf path."
5134
(let ((out (shell-command-to-string "ghc-pkg --user list no-results-please")))

haskell-process.el

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,7 @@ HPTYPE is the result of calling `'haskell-process-type`' function."
102102
session-name
103103
nil)
104104
(apply haskell-process-wrapper-function
105-
(list (list haskell-process-path-cabal-ghci)))))
106-
('cabal-dev
107-
(let ((dir (concat (haskell-session-cabal-dir session) "/cabal-dev")))
108-
(append (list (format "Starting inferior cabal-dev process %s -s %s ..."
109-
haskell-process-path-cabal-dev dir)
110-
session-name
111-
nil)
112-
(apply haskell-process-wrapper-function
113-
(list (cons haskell-process-path-cabal-dev (list "ghci" "-s" dir))))))))))
105+
(list (list haskell-process-path-cabal-ghci))))))))
114106

115107
(defun haskell-process-make (name)
116108
"Make an inferior Haskell process."

tests/haskell-process-tests.el

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -61,38 +61,5 @@
6161
((haskell-session-target "dummy-session2") => "dumdum-session"))
6262
(haskell-process-compute-process-log-and-command "dummy-session2" 'cabal-repl))))))
6363

64-
(ert-deftest test-haskell-process--compute-process-log-and-command-cabal-ghci ()
65-
(should (equal '("Starting inferior cabal-ghci process using cabal-ghci ..." "dumses3" nil "cabal-ghci")
66-
(let ((haskell-process-path-ghci "ghci"))
67-
(custom-set-variables '(haskell-process-wrapper-function #'identity))
68-
(mocklet (((haskell-session-name "dummy-session3") => "dumses3"))
69-
(haskell-process-compute-process-log-and-command "dummy-session3" 'cabal-ghci))))))
70-
71-
(ert-deftest test-haskell-process--with-wrapper-compute-process-log-and-command-cabal-ghci ()
72-
(should (equal '("Starting inferior cabal-ghci process using cabal-ghci ..." "dumses3" nil "nix-shell" "default.nix" "--command" "cabal-ghci")
73-
(let ((haskell-process-path-ghci "ghci"))
74-
(custom-set-variables '(haskell-process-wrapper-function
75-
(lambda (argv) (append (list "nix-shell" "default.nix" "--command" )
76-
(list (shell-quote-argument (mapconcat 'identity argv " ")))))))
77-
(mocklet (((haskell-session-name "dummy-session3") => "dumses3"))
78-
(haskell-process-compute-process-log-and-command "dummy-session3" 'cabal-ghci))))))
79-
80-
(ert-deftest test-haskell-process--compute-process-log-and-command-cabal-dev ()
81-
(should (equal '("Starting inferior cabal-dev process cabal-dev -s directory/cabal-dev ..." "dumses4" nil "cabal-dev" "ghci" "-s" "directory/cabal-dev")
82-
(let ((haskell-process-path-cabal-dev "cabal-dev"))
83-
(custom-set-variables '(haskell-process-wrapper-function #'identity))
84-
(mocklet (((haskell-session-name "dummy-session4") => "dumses4")
85-
((haskell-session-cabal-dir "dummy-session4") => "directory"))
86-
(haskell-process-compute-process-log-and-command "dummy-session4" 'cabal-dev))))))
87-
88-
(ert-deftest test-haskell-process--with-wrapper-compute-process-log-and-command-cabal-dev ()
89-
(should (equal '("Starting inferior cabal-dev process cabal-dev -s directory/cabal-dev ..." "dumses4" nil "run-with-docker" "cabal-dev\\ ghci\\ -s\\ directory/cabal-dev")
90-
(let ((haskell-process-path-cabal-dev "cabal-dev"))
91-
(custom-set-variables '(haskell-process-wrapper-function
92-
(lambda (argv) (append (list "run-with-docker")
93-
(list (shell-quote-argument (mapconcat 'identity argv " ")))))))
94-
(mocklet (((haskell-session-name "dummy-session4") => "dumses4")
95-
((haskell-session-cabal-dir "dummy-session4") => "directory"))
96-
(haskell-process-compute-process-log-and-command "dummy-session4" 'cabal-dev))))))
9764

9865
;;; haskell-process-tests.el ends here

0 commit comments

Comments
 (0)