Merge branch 'master' of github.com:kazu-yamamoto/ghc-mod

This commit is contained in:
Daniel Gröber 2015-08-14 10:38:23 +02:00
commit 4084e9aafc
3 changed files with 10 additions and 4 deletions

View File

@ -119,7 +119,7 @@ foo xs = foldr bar id xs
bar = (:)
|<
C-xC-s highlights the 2nd line. C-c? displays the following:
C-xC-s highlights the 2nd line. M-? displays the following:
>|
Couldn't match type `[a -> a]' with `a -> a'
@ -139,7 +139,7 @@ foo xs = foldr _bar id xs
bar = (:)
|<
C-c? displays:
M-? displays:
>|
Found hole `_bar' with type: (a -> a) -> (a -> a) -> a -> a

View File

@ -65,7 +65,9 @@ nil do not display errors/warnings.
(defun ghc-check-syntax ()
(interactive)
;; Only check syntax of visible buffers
(when (get-buffer-window (current-buffer) t)
(when (and (buffer-file-name)
(file-exists-p (buffer-file-name))
(get-buffer-window (current-buffer) t))
(with-timeout
(10 (error "ghc process may have hung or exited with an error"))
(while ghc-process-running (sleep-for 0.1)))

View File

@ -10,6 +10,9 @@
(require 'ghc-func)
(defvar ghc-debug-options nil)
;; (setq ghc-debug-options '("-v9"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar ghc-process-running nil)
@ -68,7 +71,8 @@
(t cpro)))
(defun ghc-start-process (name buf)
(let* ((opts (append '("-b" "\n" "-l" "--line-prefix=O: ,E: ")
(let* ((opts (append ghc-debug-options
'("-b" "\n" "-l" "--line-prefix=O: ,E: ")
(ghc-make-ghc-options)
'("legacy-interactive")))
(pro (apply 'start-file-process name buf ghc-command opts)))