Skip to content

Commit 3c9279d

Browse files
The locate-dominating-file function using a lambda doesn't work.
The function is applied to the directory name, thus string= looking for .cabal-sandbox is not going to work.
1 parent 8b9a4bd commit 3c9279d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

haskell-process.el

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -535,15 +535,15 @@ to be loaded by ghci."
535535
(defun haskell-process-type ()
536536
"Return `haskell-process-type', or a guess if that variable is 'auto."
537537
(if (eq 'auto haskell-process-type)
538-
(let ((nix-shell-found (locate-dominating-file default-directory
539-
(lambda (f)
540-
(string= "shell.nix" f))))
541-
(cabal-found (locate-dominating-file default-directory
542-
(lambda (d)
543-
(or (file-directory-p (expand-file-name ".cabal-sandbox" d))
544-
(cl-find-if (lambda (f) (string-match-p "\\.cabal\\'" f)) (directory-files d)))))))
545-
(cond ((and cabal-found nix-shell-found) 'nix-shell-cabal-repl)
546-
(cabal-found 'cabal-repl)
538+
(let ((nix-shell-found (locate-dominating-file default-directory "shell.nix"))
539+
(cabal-sandbox-found (locate-dominating-file
540+
default-directory
541+
(lambda (d)
542+
(or (file-directory-p (expand-file-name ".cabal-sandbox" d))
543+
(cl-find-if (lambda (f) (string-match-p "\\.cabal\\'" f))
544+
(directory-files d)))))))
545+
(cond ((and cabal-sandbox-found nix-shell-found) 'nix-shell-cabal-repl)
546+
(cabal-sandbox-found 'cabal-repl)
547547
(nix-shell-found 'nix-shell-ghci)
548548
(t 'ghci)))
549549
haskell-process-type))

0 commit comments

Comments
 (0)