Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix inferior-haskell-load-file crash

* inf-haskell.el (inferior-haskell-find-project-root): Open buffer
  pointing to cabal file (if it exists).

inferior-haskell-load-file would crash when a buffer pointing to the
cabal file of current 'project' did not exist.
  • Loading branch information...
commit 3758409b875fd259e6d91d5d91af52019999b772 1 parent 4bd22d0
@suhailshergill suhailshergill authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 inf-haskell.el
View
6 inf-haskell.el
@@ -283,7 +283,11 @@ The process PROC should be associated to a comint buffer."
(defun inferior-haskell-find-project-root (buf)
(with-current-buffer buf
- (let ((cabal (inferior-haskell-cabal-of-buf buf)))
+ (let* (
+ (cabal-file (inferior-haskell-cabal-of-buf buf))
+ (cabal (when cabal-file
+ (find-file-noselect cabal-file)))
+ )
(or (when cabal
(with-current-buffer cabal
(let ((hsd (haskell-cabal-get-setting "hs-source-dirs")))
Please sign in to comment.
Something went wrong with that request. Please try again.