ghc-debug now displays the output of "ghc-mod debug". (#571)

This commit is contained in:
Kazu Yamamoto 2015-08-28 10:23:57 +09:00
parent 7e908fcd5e
commit 8a2e490592
1 changed files with 6 additions and 2 deletions

View File

@ -138,7 +138,8 @@
(el-ver ghc-version)
(ghc-ver (ghc-run-ghc-mod '("--version") "ghc"))
(ghc-mod-ver (ghc-run-ghc-mod '("version")))
(path (getenv "PATH")))
(path (getenv "PATH"))
(debug (ghc-run-ghc-mod '("debug")))) ;; before switching buffers.
(switch-to-buffer (get-buffer-create "**GHC Debug**"))
(erase-buffer)
(insert "Path: check if you are using intended programs.\n")
@ -150,7 +151,10 @@
(insert (format "\t %s\n" ghc-mod-ver))
(insert (format "\t%s\n" ghc-ver))
(insert "\nEnvironment variables:\n")
(insert (format "\tPATH=%s\n" path))))
(insert (format "\tPATH=%s\n" path))
(insert "\nThe result of \"ghc-mod debug\":\n")
(insert debug)
(goto-char (point-min))))
(defun ghc-insert-template-or-signature (&optional flag)
(interactive "P")