2012-05-12 10:58:47 +00:00
|
|
|
#
|
|
|
|
# Enables local Haskell package installation.
|
|
|
|
#
|
|
|
|
# Authors:
|
|
|
|
# Sebastian Wiesner <lunaryorn@googlemail.com>
|
|
|
|
#
|
|
|
|
|
2012-07-23 19:00:44 +00:00
|
|
|
# Return if requirements are not found.
|
|
|
|
if (( ! $+commands[ghc] )); then
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
2012-05-12 10:58:47 +00:00
|
|
|
# Prepend Cabal per user directories to PATH/MANPATH.
|
2012-10-11 12:23:41 +00:00
|
|
|
if [[ "$OSTYPE" == darwin* && -d $HOME/Library/Haskell ]]; then
|
2012-05-12 10:58:47 +00:00
|
|
|
path=($HOME/Library/Haskell/bin(/N) $path)
|
|
|
|
manpath=($HOME/Library/Haskell/man(/N) $manpath)
|
|
|
|
else
|
|
|
|
path=($HOME/.cabal/bin(/N) $path)
|
2012-09-20 12:34:22 +00:00
|
|
|
manpath=($HOME/.cabal/man(/N) $manpath)
|
2012-05-12 10:58:47 +00:00
|
|
|
fi
|