Skip to content

Instantly share code, notes, and snippets.

@IMOKURI
Last active August 29, 2015 14:19
Show Gist options
  • Save IMOKURI/be90c72791cbbe2e1dc1 to your computer and use it in GitHub Desktop.
Save IMOKURI/be90c72791cbbe2e1dc1 to your computer and use it in GitHub Desktop.
Cabalの初期設定

Cabal最新化

cabal update
cabal install cabal-install

PATH設定

$HOME/.bash_profile に設定追加

export PATH=$HOME/.cabal/bin:$PATH

hlint, hoogleインストール

cabal update
cabal install hlint hoogle
hoogle data

sandbox用alias設定

$HOME/.bashrc に設定追加

alias ghc-sandbox="ghc -package-db .cabal-sandbox/*-packages.conf.d"
alias ghci-sandbox="ghci -package-db .cabal-sandbox/*-packages.conf.d"
alias runhaskell-sandbox="runhaskell -package-db .cabal-sandbox/*-packages.conf.d"

ghci設定

$HOME/.ghc/ghci.conf に設定追加

:set prompt "ghci> "
:set editor "vim"

:def hlint const . return $ ":! hlint \"src\""
:def hoogle \s -> return $ ":! hoogle --count=15 \"" ++ s ++ "\""

.ghcのディレクトリと、ghci.confはパーミッションを x00 にしないと読み込まれない

参考

What I Wish I Knew When Learning Haskell
How I Start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment