                                (list (list state
                                            (or callback #'ignore)
                                            cmd)))))
+               (when debug-on-error
+                 (message "[Intero] -> %s" cmd))
                (process-send-string (intero-process worker)
                                     (concat cmd "\n")))
       (error "Intero process is not running. Run M-x intero-restart to start it."))))

  (interactive)
  (let* ((old-options
          (list
            (list :key "load-all"
                  :title "Load all modules"
                  :default (not (buffer-local-value 'intero-repl-no-load backend-buffer)))
            (list :key "build-first"
                  :title "Build project first"
                  :default (not (buffer-local-value 'intero-repl-no-build backend-buffer)))))
         (new-options (intero-multiswitch "Start REPL with options:" old-options)))
    (with-current-buffer backend-buffer
      (setq intero-repl-no-load (not (member "load-all" new-options)))

         (font-lock-fontify-buffer)
         (buffer-string))))))

(defun intero-info (ident)
  "Get the info of the thing at point."
  (interactive (list (intero-ident-at-point)))
  (let ((origin-buffer (current-buffer))
        (package (intero-package-name))
        (info (intero-get-info-of ident))
        (help-xref-following nil)
        (origin (buffer-name)))
    (help-setup-xref (list #'intero-call-in-buffer origin-buffer 'intero-info ident)
                     (called-interactively-p 'interactive))
    (save-excursion
      (let ((help-xref-following nil))
        (with-help-window (help-buffer)
          (with-current-buffer (help-buffer)
            (insert
             (with-temp-buffer
               (when (fboundp 'haskell-mode)
                 (haskell-mode))
               (insert ident)
               (font-lock-fontify-buffer)
               (buffer-string))
             " in `"
             origin
             "'"
             " (" package ")"
             "\n\n"
             (with-temp-buffer
               (when (fboundp 'haskell-mode)
                 (haskell-mode))
               (insert info)
               (font-lock-fontify-buffer)
               (buffer-string)))
            (goto-char (point-min))))))))

(defun intero-goto-definition ()
  "Jump to the definition of the thing at point."
