    (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

  (let* ((bounds (bounds-of-thing-at-point 'ocamlatom))
         (result (merlin-type-of-expression bounds (buffer-substring-no-properties (car bounds) (cdr bounds))))
         (typedef (cdr (merlin-type-of-expression-global nil (cdr result)))))
    (if typedef
        (message "%s" typedef)
      (message "%s: <no information>" (cdr result)))))


(defun merlin-show-type-of-region ()

                       (buffer-substring-no-properties (car bounds)
                                                       (cdr bounds))))
         (result (merlin-type-of-expression bounds substring)))
    (merlin-display-type (car result) (cdr result) &optional quiet)))

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