Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix inferior-haskell-load-file crash #58

Merged
merged 1 commit into from

2 participants

@suhailshergill
  • 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.

@suhailshergill suhailshergill 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.
3758409
@chrisdone chrisdone merged commit 3758409 into haskell:master
@chrisdone
Owner

Sorry, must've missed this pull request in my inbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 5, 2012
  1. @suhailshergill

    Fix inferior-haskell-load-file crash

    suhailshergill authored
    * 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.
This page is out of date. Refresh to see the latest.
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")))
Something went wrong with that request. Please try again.