Last active
October 3, 2018 23:15
-
-
Save creichert/908e3f90eb79e1f6e665e8dd6c538c43 to your computer and use it in GitHub Desktop.
Toggle the haskell-process-type between Stack & Cabal in haskell-mode for Emacs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Toggle the haskell-mode haskell-process-type variable between | |
;; cabal and stack | |
;; | |
;; https://stackoverflow.com/a/27385914/3066608 | |
(defvar haskell-process-use-ghci nil) | |
(defun haskell-process-toggle () | |
"Toggle GHCi process between cabal and ghci" | |
(interactive) | |
(if haskell-process-use-stack-ghci | |
(progn (setq haskell-process-type 'cabal-repl) | |
(setq haskell-process-use-stack-ghci nil) | |
(message "Using cabal repl")) | |
(progn (setq haskell-process-type 'stack-ghci) | |
(setq haskell-process-use-stack-ghci t) | |
(message "Using Stack GHCi")))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment