   "Compile the current project using `nix-hs-build'."
   (interactive)
   (let* ((cabal-file (pjones:haskell-find-cabal-file))
-         (default-directory (file-name-directory cabal-file))
-         (cmd "nix-hs-build"))
-    (compile cmd)))
+         (default-directory (file-name-directory cabal-file)))
+    (compile haskell-compile-cabal-build-command)))
 
 (defun pjones:haskell-beginning-of-defun (&optional arg)
   "Move to the beginning of the current function."


  ;; And add some of my own (Note: "C-c TAB" is really "C-c i")
  (let ((map haskell-mode-map))
    (define-key map (kbd "C-c h") 'hydra-haskell/body)
    (define-key map (kbd "C-c TAB") 'haskell-navigate-imports)
    (define-key map (kbd "C-c C-c") 'pjones:haskell-compile)
    (define-key map (kbd "C-c C-e") 'pjones:haskell-edit-cabal-file)
    (define-key map (kbd "C-c C-s") 'pjones:haskell-sort-imports)
    (define-key map (kbd "C-c C-v") 'pjones:haskell-lint-all)
    (define-key map (kbd "C-c M-m") 'pjones:haskell-new-module)
    (define-key map (kbd "C-c M-w") 'pjones:haskell-module-name-to-kill-ring)
    (define-key map (kbd "M-RET")   'pjones:haskell-smart-newline)))

(add-hook 'haskell-mode-hook 'pjones:haskell-mode-hook)
(add-hook 'haskell-mode-hook 'haskell-indentation-mode)
(add-hook 'haskell-mode-hook 'interactive-haskell-mode)
(add-hook 'haskell-cabal-mode-hook 'pjones:prog-mode-hook)

;; Local Variables:

  (require 'cl)
  (require 'ghc)
  (require 'projectile)
  (require 'haskell-compile)
  (require 'haskell-indentation)
  (require 'haskell-mode))

