README 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. Happy Haskell programming on Emacs/Vim
  2. For Vim users: see https://github.com/eagletmt/ghcmod-vim
  3. For Emacs users: read the followings:
  4. Features:
  5. 1) Completions of keyword, module, class, function, types,
  6. language extensions, etc.
  7. 2) Flymake with GHC and hlint
  8. 3) Inserting code template
  9. The "ghc-mod" program written in Haskell is a backend to gather
  10. information from GHC and hlint.
  11. Elisp libraries including ghc-mod is an extension to haskell-mode.
  12. You should put the followings in your "~/.emacs.el":
  13. (autoload 'ghc-init "ghc" nil t)
  14. (add-hook 'haskell-mode-hook (lambda () (ghc-init)))
  15. or
  16. (add-hook 'haskell-mode-hook (lambda () (ghc-init) (flymake-mode)))
  17. Changes:
  18. If you have customized GHC import-path like follows,
  19. (setq ghc-flymake-check-includes '("dir1" "dir2"))
  20. You may update your settings as follows.
  21. (setq ghc-ghc-options '("-idir1" "-idir2"))
  22. or
  23. (setq ghc-ghc-options '("-idir1:dir2"))
  24. Now, you can simply pass GHC options to ghc-mod sub-commands.
  25. For more information, see:
  26. http://www.mew.org/~kazu/proj/ghc-mod/