Main is passed if not exist.

This commit is contained in:
Kazu Yamamoto 2012-02-16 14:50:15 +09:00
parent f3725127bc
commit b9f5c8f9f4
1 changed files with 4 additions and 8 deletions

View File

@ -14,10 +14,8 @@
(interactive "P")
(if (not (ghc-which ghc-module-command))
(message "%s not found" ghc-module-command)
(let ((modname (ghc-find-module-name)))
(if (not modname)
(message "module should be specified")
(ghc-show-info0 ask modname)))))
(let ((modname (or (ghc-find-module-name) "Main")))
(ghc-show-info0 ask modname))))
(defun ghc-show-info0 (ask modname)
(let* ((expr0 (ghc-things-at-point))
@ -87,10 +85,8 @@
(interactive)
(if (not (ghc-which ghc-module-command))
(message "%s not found" ghc-module-command)
(let ((modname (ghc-find-module-name)))
(if (not modname)
(message "module should be specified")
(ghc-show-type0 modname)))))
(let ((modname (or (ghc-find-module-name) "Main")))
(ghc-show-type0 modname))))
(defun ghc-show-type0 (modname)
(let* ((buf (current-buffer))