ghc-debug displays PATH env.

This commit is contained in:
Kazu Yamamoto 2014-06-25 15:05:23 +09:00
parent b24293f49f
commit 648f914ac5

View File

@ -121,13 +121,14 @@
(defun ghc-debug () (defun ghc-debug ()
(interactive) (interactive)
(let ((el-path (locate-file "ghc.el" load-path)) (let ((el-path (locate-file "ghc.el" load-path))
(ghc-path (executable-find "ghc")) (ghc-path (executable-find "ghc")) ;; FIXME
(ghc-mod-path (executable-find ghc-module-command)) (ghc-mod-path (executable-find ghc-module-command))
(ghc-modi-path (executable-find ghc-interactive-command)) (ghc-modi-path (executable-find ghc-interactive-command))
(el-ver ghc-version) (el-ver ghc-version)
(ghc-ver (ghc-run-ghc-mod '("--version") "ghc")) (ghc-ver (ghc-run-ghc-mod '("--version") "ghc"))
(ghc-mod-ver (ghc-run-ghc-mod '("version"))) (ghc-mod-ver (ghc-run-ghc-mod '("version")))
(ghc-modi-ver (ghc-run-ghc-mod '("version") ghc-interactive-command))) (ghc-modi-ver (ghc-run-ghc-mod '("version") ghc-interactive-command))
(path (getenv "PATH")))
(switch-to-buffer (get-buffer-create "**GHC Debug**")) (switch-to-buffer (get-buffer-create "**GHC Debug**"))
(erase-buffer) (erase-buffer)
(insert "Path: check if you are using intended programs.\n") (insert "Path: check if you are using intended programs.\n")
@ -139,6 +140,8 @@
(insert (format "\t ghc.el version %s\n" el-ver)) (insert (format "\t ghc.el version %s\n" el-ver))
(insert (format "\t %s\n" ghc-mod-ver)) (insert (format "\t %s\n" ghc-mod-ver))
(insert (format "\t%s\n" ghc-modi-ver)) (insert (format "\t%s\n" ghc-modi-ver))
(insert (format "\t%s\n" ghc-ver)))) (insert (format "\t%s\n" ghc-ver))
(insert "\nEnvironment variables:\n")
(insert (format "\tPATH=%s\n" path))))
(provide 'ghc) (provide 'ghc)