asking expression.

This commit is contained in:
Kazu Yamamoto 2013-05-20 17:04:18 +09:00
parent 5959791e25
commit 92833da809

View File

@ -15,10 +15,11 @@
(defun ghc-browse-document (&optional haskell-org)
(interactive "P")
(let ((mod0 (ghc-extract-module))
(expr (ghc-things-at-point)))
(expr0 (ghc-things-at-point)))
(cond
((and (not mod0) expr)
(let* ((info (ghc-get-info expr))
((and (not mod0) expr0)
(let* ((expr (ghc-read-expression expr0))
(info (ghc-get-info expr0))
(mod (ghc-extact-module-from-info info))
(pkg (ghc-resolve-package-name mod)))
(if (and pkg mod)
@ -105,6 +106,9 @@
(defun ghc-read-module-name (def)
(read-from-minibuffer "Module name: " def ghc-input-map))
(defun ghc-read-expression (def)
(read-from-minibuffer "Expression: " def ghc-input-map))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun ghc-extract-module ()