making use of ghc-run-ghc-mod.

This commit is contained in:
Kazu Yamamoto 2014-04-21 11:37:33 +09:00
parent df4dd97e48
commit e4f4ef52c0

View File

@ -23,13 +23,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun ghc-get-project-root () (defun ghc-get-project-root ()
(let ((file (buffer-file-name))) (ghc-run-ghc-mod '("root")))
(when file
(with-temp-buffer
(ghc-call-process ghc-module-command nil t nil "root" file)
(goto-char (point-min))
(when (looking-at "^\\(.*\\)$")
(match-string-no-properties 1))))))
(defun ghc-with-process (cmd callback) (defun ghc-with-process (cmd callback)
(unless ghc-process-process-name (unless ghc-process-process-name