       (erase-buffer)
       (insert (cl-case install-status
                 (not-installed "Intero is not installed in the Stack environment.")
-                (wrong-version "The wrong version of Intero is installed for this Emacs package."))
-              (format "
-
-Installing intero-%s automatically ...
-
-" intero-package-version))
-      (intero-old-auto-install source-buffer targets buffer stack-yaml))))
+                (wrong-version "The wrong version of Intero is installed for this Emacs package.")))
+      (if (intero-version>= (intero-stack-version) '(1 6 1))
+          (intero-copy-compiler-tool-auto-install source-buffer targets buffer)
+        (intero-old-auto-install source-buffer targets buffer stack-yaml)))))
+
+(defun intero-copy-compiler-tool-auto-install (source-buffer targets buffer)
+  "Automatically install Intero appropriately for BUFFER.
+Use the given TARGETS, SOURCE-BUFFER and STACK-YAML."
+  (let ((ghc-version (intero-ghc-version-raw)))
+    (insert
+     (format "
+
+Installing intero-%s for GHC %s ...
+
+" intero-package-version ghc-version))
+    (redisplay)
+    (cl-case
+        (let ((default-directory (make-temp-file "intero" t)))
+          (intero-call-stack
+           nil (current-buffer) t nil "build"
+           "--copy-compiler-tool"
+           (concat "intero-" intero-package-version)
+           "--flag" "haskeline:-terminfo"
+           "--resolver" (concat "ghc-" ghc-version)
+           "ghc-paths-0.1.0.9" "mtl-2.2.2" "network-2.7.0.0" "random-1.1" "syb-0.7"))
+      (0
+       (message "Installed successfully! Starting Intero in a moment ...")
+       (bury-buffer buffer)
+       (switch-to-buffer source-buffer)
+       (intero-start-process-in-buffer buffer targets source-buffer))
+      (1
+       (with-current-buffer buffer (setq-local intero-give-up t))
+       (insert (propertize "Could not install Intero!
+
+We don't know why it failed. Please read the above output and try
+installing manually. If that doesn't work, report this as a
+problem.
+
+WHAT TO DO NEXT
+
+If you don't want to Intero to try installing itself again for
+this project, just keep this buffer around in your Emacs.
+
+If you'd like to try again next time you try use an Intero
+feature, kill this buffer.
+"
+                           'face 'compilation-error))
+       nil))))
 
 (defun intero-old-auto-install (source-buffer targets buffer stack-yaml)
   "Automatically install Intero appropriately for BUFFER.
 Use the given TARGETS, SOURCE-BUFFER and STACK-YAML."
+  (insert
+   "
+
+Installing intero-%s automatically ...
+
+" intero-package-version)
   (redisplay)
   (cl-case (intero-call-stack
             nil (current-buffer) t stack-yaml

      buffer
    (let* ((options
            (intero-make-options-list
             "intero"
             (or targets
                 (let ((package-name (buffer-local-value 'intero-package-name buffer)))
                   (unless (equal "" package-name)

      (goto-char (point-min))
      (search-forward-regexp "cannot satisfy -package" nil t 1))))

(defun intero-executable-path (stack-yaml)
  "The path for the intero executable."
  (intero-with-temp-buffer
    (cl-case (save-excursion
               (intero-call-stack
                nil (current-buffer) t intero-stack-yaml "path" "--compiler-tools-bin"))
      (0 (replace-regexp-in-string "[\r\n]+$" "/intero" (buffer-string)))
      (1 "intero"))))

(defun intero-installed-p ()
  "Return non-nil if intero (of the right version) is installed in the stack environment."
  (redisplay)
  (intero-with-temp-buffer
    (if (= 0 (intero-call-stack
              nil t nil intero-stack-yaml
              "exec"
              "--verbosity" "silent"
              "--"
              (intero-executable-path intero-stack-yaml)
              "--version"))
        (progn
          (goto-char (point-min))
          ;; This skipping comes due to https://github.com/commercialhaskell/intero/pull/216/files
