Skip to content
Browse files

More cleverness in getting :i/:t (fixes #56).

  • Loading branch information...
1 parent 73ef95a commit e5f13856a7628969669f2d8eb3e9eb354901fea0 @chrisdone chrisdone committed Jul 18, 2012
Showing with 10 additions and 3 deletions.
  1. +10 −3 haskell-process.el
View
13 haskell-process.el
@@ -140,15 +140,22 @@ has changed?"
(interactive "P")
(haskell-process-do-simple-echo
insert-value
- (format ":type (%s)" (haskell-ident-at-point))))
+ (let ((ident (haskell-ident-at-point)))
+ (format (if (string-match "^[a-z][A-Z]" ident)
+ ":type %s"
+ ":type (%s)")
+ ident))))
(defun haskell-process-do-info (&optional ident)
"Print the info of the given expression."
(interactive)
(haskell-process-do-simple-echo
nil
- (format ":info %s" (or ident
- (haskell-ident-at-point)))))
+ (format (if (string-match "^[a-z][A-Z]" ident)
+ ":info %s"
+ ":info (%s)")
+ (or ident
+ (haskell-ident-at-point)))))
(defun haskell-process-do-try-info (sym)
"Get info of `sym' and echo in the minibuffer."

0 comments on commit e5f1385

Please sign in to comment.
Something went wrong with that request. Please try again.