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
|
|
|
|
|
2020-03-29 19:49:35 +00:00
|
|
|
# Load dependencies.
|
|
|
|
pmodload 'helper'
|
|
|
|
|
2013-01-28 22:08:56 +00:00
|
|
|
# Prepend Cabal per user directories to PATH.
|
2020-02-13 08:56:29 +00:00
|
|
|
if is-darwin && [[ -d $HOME/Library/Haskell ]]; then
|
2012-05-12 10:58:47 +00:00
|
|
|
path=($HOME/Library/Haskell/bin(/N) $path)
|
|
|
|
else
|
|
|
|
path=($HOME/.cabal/bin(/N) $path)
|
|
|
|
fi
|