         (process-send-string process ":set -fobject-code\n")
         (process-send-string process ":set prompt \"\\4\"\n")
         (with-current-buffer buffer
+          (setq intero-targets targets)
           (setq intero-arguments arguments)
           (setq intero-callbacks
                 (list (list source-buffer

(defvar intero-arguments (list)
  "Arguments used to call the stack process.")
(make-variable-buffer-local 'intero-arguments)

(defvar intero-project-root nil
  "The project root of the current buffer.")

        (goto-char (point-min))
        (forward-line (1- line))
        (forward-char (1- col))))))

(defun intero-restart ()
  "Simply restart the process with the same configuration as before."
  (interactive)
  (let ((targets (with-current-buffer (intero-buffer)
                   intero-targets)))
    (intero-destroy)
    (intero-get-worker-create targets (current-buffer))))

(defun intero-targets ()
  "Set the targets to use for stack ghci."
