Browse Source

Fallback to standard cabal location on OS X

If ~/Library/Haskell does not exist, fall back to ~/.cabal/bin.

Ideally, we'd parse ~/.cabal/config here, but cabal does not provide an
interface to get configuration settings.
master
Sebastian Wiesner 12 years ago committed by Sorin Ionescu
parent
commit
13b501adaf
  1. 3
      modules/haskell/init.zsh

3
modules/haskell/init.zsh

@ -11,11 +11,10 @@ if (( ! $+commands[ghc] )); then
fi fi
# Prepend Cabal per user directories to PATH/MANPATH. # Prepend Cabal per user directories to PATH/MANPATH.
if [[ "$OSTYPE" == darwin* ]]; then if [[ "$OSTYPE" == darwin* && -d $HOME/Library/Haskell ]]; then
path=($HOME/Library/Haskell/bin(/N) $path) path=($HOME/Library/Haskell/bin(/N) $path)
manpath=($HOME/Library/Haskell/man(/N) $manpath) manpath=($HOME/Library/Haskell/man(/N) $manpath)
else else
path=($HOME/.cabal/bin(/N) $path) path=($HOME/.cabal/bin(/N) $path)
manpath=($HOME/.cabal/man(/N) $manpath) manpath=($HOME/.cabal/man(/N) $manpath)
fi fi

Loading…
Cancel
Save