82bb0090c0
This turned out to be quite involved but save for this huge commit it's actually quite awesome and squashes quite a few bugs and nasty problems (hopefully). Most importantly we now have native cabal component support without the user having to do anything to get it! To do this we traverse imports starting from each component's entrypoints (library modules or Main source file for executables) and use this information to find which component's options each module will build with. Under the assumption that these modules have to build with every component they're used in we can now just pick one. Quite a few internal assumptions have been invalidated by this change. Most importantly the runGhcModT* family of cuntions now change the current working directory to `cradleRootDir`. |
||
---|---|---|
cabal-helper | ||
doc | ||
elisp | ||
Language/Haskell | ||
NotCPP | ||
scripts | ||
src | ||
test | ||
test-elisp | ||
.ghci | ||
.gitignore | ||
.travis.yml | ||
CodingStyle | ||
COPYING.AGPL3 | ||
COPYING.BSD3 | ||
ghc-mod.cabal | ||
hcar-ghc-mod.tex | ||
README.md | ||
Setup.hs | ||
SetupCompat.hs | ||
Utils.hs |
Happy Haskell Programming
Please read: http://www.mew.org/~kazu/proj/ghc-mod/
Using the stable version
The Emacs front-end is available from stable MELPA. This package should always be compatible with the latest version of ghc-mod from hackage.
To use stable stable MELPA add this to your .emacs
:
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa-stable.milkbox.net/packages/"))
(package-initialize)
With this configuration you can install the Emacs front end from MELPA (the
package is called ghc
there, not ghc-mod
) and install the
ghc-mod
/ghc-modi
binaries from hackage by doing:
% cabal update && cabal install ghc-mod
Nix & NixOS
The installation is a little more involved in this environment as Nix needs some ugly hacks to get packages using the GHC API to work, please refer to this stackoverflow answer:
http://stackoverflow.com/a/24228830
Using the development version
The easiest way to hack on ghc-mod is compile it, then add dist/build/ghc-mod
and dist/build/ghc-modi
to your PATH
and add the elisp/
directory to your
Emacs load-path
.
Make sure you're not using the MELPA version of ghc.el
otherwise you might get
all sorts of nasty conflicts.
IRC
If you have any problems, suggestions, comments swing by #ghc-mod on Freenode.