Using executable-find instead of ghc-which.
This commit is contained in:
parent
3861625420
commit
549e045673
@ -95,7 +95,7 @@ unloaded modules are loaded")
|
||||
;;;
|
||||
|
||||
(defun ghc-boot (n)
|
||||
(if (not (ghc-which ghc-module-command))
|
||||
(if (not (executable-find ghc-module-command))
|
||||
(message "%s not found" ghc-module-command)
|
||||
(ghc-read-lisp-list
|
||||
(lambda ()
|
||||
@ -105,7 +105,7 @@ unloaded modules are loaded")
|
||||
n)))
|
||||
|
||||
(defun ghc-load-modules (mods)
|
||||
(if (not (ghc-which ghc-module-command))
|
||||
(if (not (executable-find ghc-module-command))
|
||||
(message "%s not found" ghc-module-command)
|
||||
(ghc-read-lisp-list
|
||||
(lambda ()
|
||||
|
@ -49,17 +49,6 @@
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defun ghc-which (cmd)
|
||||
(catch 'loop
|
||||
(dolist (suffix '("" ".exe"))
|
||||
(let ((cmds (concat cmd suffix)))
|
||||
(dolist (dir exec-path)
|
||||
(let ((path (expand-file-name cmds dir)))
|
||||
(if (file-exists-p path)
|
||||
(throw 'loop path))))))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defun ghc-uniq-lol (lol)
|
||||
(let ((hash (make-hash-table :test 'equal))
|
||||
ret)
|
||||
|
@ -70,7 +70,7 @@
|
||||
|
||||
(defun ghc-show-type ()
|
||||
(interactive)
|
||||
(if (not (ghc-which ghc-module-command))
|
||||
(if (not (executable-find ghc-module-command))
|
||||
(message "%s not found" ghc-module-command)
|
||||
(let ((modname (or (ghc-find-module-name) "Main")))
|
||||
(ghc-show-type0 modname))))
|
||||
@ -134,7 +134,7 @@
|
||||
|
||||
(defun ghc-display-information (cmds fontify)
|
||||
(interactive)
|
||||
(if (not (ghc-which ghc-module-command))
|
||||
(if (not (executable-find ghc-module-command))
|
||||
(message "%s not found" ghc-module-command)
|
||||
(ghc-display
|
||||
fontify
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
(defun ghc-insert-module ()
|
||||
(interactive)
|
||||
(if (not (ghc-which ghc-hoogle-command))
|
||||
(if (not (executable-find ghc-hoogle-command))
|
||||
(message "\"%s\" not found" ghc-hoogle-command)
|
||||
(let* ((expr0 (ghc-things-at-point))
|
||||
(expr (ghc-read-expression expr0)))
|
||||
|
Loading…
Reference in New Issue
Block a user