Skip to content

Commit deb809b

Browse files
committed
Always default to cabal-repl if there is a .cabal-sandbox dir
See #864
1 parent 142334f commit deb809b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

haskell-customize.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,14 +398,16 @@ same vein as `haskell-indent-spaces'."
398398
"Return `haskell-process-type', or a guess if that variable is 'auto."
399399
(if (eq 'auto haskell-process-type)
400400
(cond
401+
;; User has explicitly initialized this project with cabal
402+
((locate-dominating-file default-directory ".cabal-sandbox")
403+
'cabal-repl)
401404
((and (locate-dominating-file default-directory "stack.yaml")
402405
(executable-find "stack"))
403406
'stack-ghci)
404407
((locate-dominating-file
405408
default-directory
406409
(lambda (d)
407-
(or (file-directory-p (expand-file-name ".cabal-sandbox" d))
408-
(cl-find-if (lambda (f) (string-match-p ".\\.cabal\\'" f)) (directory-files d)))))
410+
(cl-find-if (lambda (f) (string-match-p ".\\.cabal\\'" f)) (directory-files d))))
409411
'cabal-repl)
410412
(t 'ghci))
411413
haskell-process-type))

0 commit comments

Comments
 (0)