making use of ghc-run-ghc-mod.
This commit is contained in:
parent
df4dd97e48
commit
e4f4ef52c0
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user