       (if (> arg 1)
           (merlin-type-enclosing-go-down)
         (merlin-type-enclosing-go-up))
-    (progn
-      (setq merlin-last-point-type (point))
-      (merlin-type-enclosing)
-      (if (not merlin-enclosing-types)
-          (merlin-show-type-of-point arg)
-        (merlin-type-enclosing-go-up)))))
+    (if (> arg 1)
+        (merlin-show-type-of-region)
+      (progn
+        (setq merlin-last-point-type (point))
+        (merlin-type-enclosing)
+        (if (not merlin-enclosing-types)
+            (merlin-show-type-of-point arg)
+          (merlin-type-enclosing-go-up))))))
 
 (defun merlin-type-enclosing-go ()
   "Highlight the given corresponding enclosing data (of the form (type . bounds)"
   (let ((data (elt merlin-enclosing-types merlin-enclosing-offset)))
     (if (cddr data)
-        (merlin-create-overlay 'merlin-enclosing-overlay (cdr data) 'next-error "5 sec"))
-    (message "%s" (car data))))
+        (merlin-display-type (cdr data) (car data)))))
 
 (defun merlin-type-enclosing-go-up ()
   "Goes up in the enclosing type zipper."

                       (buffer-substring-no-properties (car bounds)
                                                       (cdr bounds))))
         (result (merlin-type-of-expression bounds substring)))
    (cond
     ((not (cdr result))
      (if (not quiet)
          (message "<no information>"))) ;; no types
     ((and (not (merlin-is-long (cdr result)))
           (not quiet))
      (merlin-create-overlay 'merlin-type-overlay
                             (car result)
                             'next-error "1 sec")
      (message "%s" (cdr result)))
     ((not (merlin-is-long (cdr result)))
      (message "%s"
               (cdr result)))
     ((not quiet)
      (display-buffer merlin-type-buffer)
      (with-current-buffer merlin-type-buffer
        (erase-buffer)
        (insert (cdr result)))))))

(defun merlin-show-type-def ()
  "Prints the definition of the type of the term under point"

   (merlin-type-of-expression-local bounds exp)
   (merlin-type-of-expression-global bounds exp)))


(defun merlin-display-type (bounds type &optional quiet)
  "Displays the type `type' of the the expression occuring at `bounds' in the current buffer.
   If `quiet' is non nil, then an overlay and the merlin types can be used"
  (if (not type)
      (if (not quiet)
          (message "<no information>"))
    (progn
      (if (not (merlin-is-long type))
          (progn 
            (message "%s" type)
            (if (not quiet) 
                (merlin-create-overlay 'merlin-type-overlay bounds 'highlight "1 sec")))
        (when (not quiet)
          (display-buffer merlin-type-buffer)
          (with-current-buffer merlin-type-buffer
            (erase-buffer)
            (insert type)))))))
          
(defun merlin-show-type (bounds &optional quiet)
  "This functions shows the type of the expression inside
`bounds' in the current buffer. If `quiet' is non nil then an
