If you want to get started quickly, run the following. Read below for more information.
brew install --cocoa --srgb emacs
brew install the_silver_searcher
mkdir -p tmp
pushd tmp
mkdir -p ~/.local/bin
echo 'export PATH=$HOME/.local/bin:$PATH' >> ~/.bashrc && source ~/.bashrc #replace bashrc if you use a different shell
curl http://s3.dbp.io/stack-binary-2015-10-23.tar.gz | tar xz
mv stack-binary/stack ~/.local/bin && rmdir stack-binary
chmod +x ~/.local/bin/stack
popd
rmdir tmp
pushd ~
stack install hlint stylish-haskell
git clone git@github.com:dbp/emacs-config .emacs-config
cd .emacs-config && make
popd
Install Emacs 24.5 from http://emacsformacosx.com.
brew install the_silver_searcher
for a faster grep - it is used by our emacs config.
Much more is on the [[Emacs|Emacs]] page!
Alternately, you can also use brew to install emacs: brew install --cocoa --srgb emacs
~Matt
There is a book we have: haskell-programming-v0.7.0.pdf
And another one!
maybe_haskell.pdf maybe_haskell.mobi maybe_haskell.epub
Stack is a project / dependency management tool similar to bundler
for Ruby.
You can download stack from:
http://s3.dbp.io/stack-binary-2015-10-23.tar.gz
- Check your PATH:
echo $PATH
. If it doesn't have/Users/you/.local/bin
then:mkdir -p ~/.local/bin && echo 'export PATH=$HOME/.local/bin:$PATH' >> ~/.bashrc && source ~/.bashrc
(replace .bashrc with .zshrc if you use zsh!). - Unzip the binary and move the program inside the resulting folder to
~/.local/bin
:tar xvzf stack-binary-2015-10-23.tar.gz && mv stack-binary/stack ~/.local/bin
- Make sure it is executable:
chmod +x ~/.local/bin/stack
Advice as of 2015/10/23 (dbp)!!!
- Before you run stack, setup the resolver version by creating
~/.stack/global/stack.yaml
with the following content:
flags: {}
packages: []
extra-deps: []
resolver: lts-3.10
-
Setup stack (downloads GHC, the haskell compiler) by running
stack setup
. -
Install
hlint
(good style suggestions) andstylish-haskell
(automatic reformatting):cd ~ && stack install hlint stylish-haskell
-
Get emacs config:
git clone git@github.com:dbp/emacs-config
(you can put it anywhere). -
Install emacs config:
cd emacs-config && make
Now start emacs and it should install and set up stuff to make Haskell work. The first time you open a project it'll install a bunch of stuff.
To setup emacs as a haskell IDE try [[here|Emacs Haskell IDE setup (including wai devel)]]