Haskell development environment

2015-12-31

Install Stack

See 1.

Test Stack

$ mkdir src
$ cd src
$ stack new hello-world simple
$ stack build
$ stack exec hello-world

Add Stack binaries to PATH

$ cd ~
$ stack setup
$ stack path | grep ghc-paths
$ stack path | grep local-bin-path

Add the ghc-paths and local-bin-path values to PATH in .bashrc. For example:

export PATH=/home/rcook/.stack/programs/x86_64-linux/ghc-7.10.2/bin:/home/rcook/.local/bin:$PATH

Set up Haskell tools

$ cd ~
$ stack install hdevtools
$ stack install hlint
$ stack install cabal-helper ghc-mod
$ stack install hoogle
$ hoogle data

Set up vim

From 2, 3, 4 and 5:

$ mkdir -p ~/.vim/autoload ~/.vim/bundle ~/.vim/swap
$ curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
$ cd ~/.vim/bundle
$ git clone https://github.com/scrooloose/syntastic.git
$ git clone https://github.com/bitc/vim-hdevtools.git
$ git clone https://github.com/eagletmt/neco-ghc.git

Tags

Haskell

Content © 2024 Richard Cook. All rights reserved.