 
 (defun merlin-imenu-create-index ()
   "Create data for imenu using the merlin outline feature."
-  (interactive)
   ;; Reset local vars
   (setq value-list nil
         type-list nil

;; URL:

(require 'imenu)
(require 'tuareg)
(require 'subr-x)
(require 'merlin)


    (when type-list (push (cons "Type" type-list) index))
    index))

;;;###autoload
(defun merlin-use-merlin-imenu ()
  "Merlin: use the custom imenu feature from Merlin"
  (interactive)
  ;; change the index function and force a rescan of imenu-index
  (setq imenu-create-index-function 'merlin-imenu-create-index)
  (imenu--cleanup)
  (setq imenu--index-alist nil))

(provide 'merlin-imenu)
;;; merlin-imenu.el ends here
