-
Notifications
You must be signed in to change notification settings - Fork 175
Frontend
The Emacs front-end is available from stable MELPA. The stable version should always be compatible with the latest version of ghc-mod from hackage which is not true for plain MELPA!
You can also use a git checkout of the ghc-mod source repository as your source for the Elisp code if you prefer.
To use stable MELPA add this to your .emacs
:
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa-stable.milkbox.net/packages/"))
(package-initialize)
(add-hook 'haskell-mode-hook (lambda () (ghc-init)))
(See also http://www.emacswiki.org/emacs/ELPA)
With this configuration you can install the Emacs front using:
M-x package-refresh-contents RET
M-x package-install RET ghc RET
Note: the ELPA package is called ghc
, not ghc-mod
Obtain the ghc-mod source somehow and then add this to your .emacs
(add-to-list 'load-path "<wherever>/ghc-mod/elisp")
(setq ghc-debug t) ; enable debug logging
(autoload 'ghc-init "ghc" nil t)
(autoload 'ghc-debug "ghc" nil t)
(add-hook 'haskell-mode-hook (lambda () (ghc-init)))
Make sure the source matches the version of the ghc-mod executables you installed otherwise you will run into all sorts of trouble.
You can check this by looking at the ghc-version
variable:
M-x describe-variable RET ghc-version RET
This value should match the output of the following command:
ghc-mod --version
TODO
https://github.com/eagletmt/ghcmod-vim https://github.com/eagletmt/neco-ghc
TODO
https://atom.io/packages/ide-haskell https://github.com/atom-haskell/ide-haskell
https://atom.io/packages/haskell-ghc-mod https://github.com/atom-haskell/haskell-ghc-mod