File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -420,21 +420,21 @@ presence of a *.cabal file or stack.yaml file or something similar.")
420
420
(let ((cabal-project (locate-dominating-file default-directory " cabal.project" ))
421
421
(cabal-sandbox (locate-dominating-file default-directory " cabal.sandbox.config" ))
422
422
(stack (locate-dominating-file default-directory " stack.yaml" ))
423
- (cabal (locate-dominating- file
423
+ (cabal (locate-file
424
424
default-directory
425
425
(lambda (d )
426
426
(cl-find-if
427
427
(lambda (f ) (string-match-p " .\\ .cabal\\ '" f))
428
428
(directory-files d))))))
429
429
(cond
430
- ((and cabal-project (executable-find " cabal" ))
430
+ ((and ( file-exists-p ( concat cabal-project " cabal.project " )) (executable-find " cabal" ))
431
431
(cons 'cabal-project cabal-project))
432
- ((and cabal-sandbox (executable-find " cabal" ))
432
+ ((and ( file-exists-p ( concat cabal-sandbox " cabal.sandbox.config " )) (executable-find " cabal" ))
433
433
(cons 'cabal-sandbox cabal-sandbox))
434
- ((and stack (executable-find " stack" ))
434
+ ((and ( file-exists-p ( concat stack " stack.yaml " )) (executable-find " stack" ))
435
435
(cons 'stack stack))
436
- ((and cabal (executable-find " cabal" ))
437
- (cons 'cabal cabal))
436
+ ((and cabal (file-exists-p cabal) ( executable-find " cabal" ))
437
+ (cons 'cabal ( file-name-directory cabal) ))
438
438
((executable-find " ghc" ) (cons 'ghc nil ))
439
439
(t (error " Could not find any installation of GHC. " )))))
440
440
You can’t perform that action at this time.
0 commit comments