       (if (and (not quiet) bounds)
           (merlin-highlight bounds 'merlin-type-face)))))
 
-(defun merlin--type-region ()
+(defun merlin--type-region (k)
   "Show the type of the region."
   (lexical-let*
-      ((substring (merlin--buffer-substring (region-beginning) (region-end)))
-       (on-success (lambda (type) (merlin--type-display nil type nil)))
+      ((k k)
+       (substring (merlin--buffer-substring (region-beginning) (region-end)))
+       (on-success (lambda (type) (merlin--type-display nil type nil) (funcall k)))
        (on-error   (lambda (err)
                      (let ((msg (assoc 'message err))
                            (typ (assoc 'type err)))

    (define-key merlin-map (kbd "C-c C-r") 'merlin-error-check)
    (define-key merlin-map (kbd "C-c TAB") 'merlin-try-completion)
    (define-key merlin-map (kbd "C-c C-t") 'merlin-type-enclosing)
;; See the discussion on #129 for the future of these bindings
;   (define-key merlin-map (kbd "C-<up>") 'merlin-type-enclosing-go-up)
;   (define-key merlin-map (kbd "C-<down>") 'merlin-type-enclosing-go-down)
    (define-key merlin-map (kbd "C-c C-n") 'merlin-phrase-next)
    (define-key merlin-map (kbd "C-c C-p") 'merlin-phrase-prev)
    (define-key merlin-menu-map [customize]

                              (message "Error: the content of the region failed to parse."))
                             (msg (message "Error: %s" (cdr msg)))
			     (t
			      (message "Unexpected error"))))
                     (funcall k))))
    (merlin--type-expression substring on-success on-error)))

(defun merlin-type-expr (exp)
