 
 (defun intero-buffer-name (worker)
   "For a given WORKER, create a buffer name."
-  (let ((root (intero-project-root)))
+  (let* ((root (intero-project-root))
+         (package-name (intero-package-name)))
     (concat " intero:"
             (format "%s" worker)
             ":"
-            (file-name-nondirectory root)
+            package-name
             " "
             root)))
 

  (when (and (not (eq major-mode 'fundamental-mode))
             (eq this-command 'intero-repl-mode))
    (error "You probably meant to run: M-x intero-repl"))
  (setq comint-prompt-regexp intero-prompt-regexp)
  (let ((arguments (intero-make-options-list intero-targets)))
    (insert (propertize
             (format "Starting:\n  stack ghci %s\n" (mapconcat #'identity arguments " "))

(require 'flycheck)
(require 'cl-lib)
(require 'company)
(require 'comint)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Configuration
