prezto/modules/haskell/init.zsh
Kaspar Vollenweider f4ca9ebfc9 feat(helper): add os-type helper functions
Add the following functions:

- is-darwin
- is-linux
- is-bsd
- is-cygwin

And apply them everywhere I found code doing that what these functions do.
2020-03-19 11:49:11 -07:00

19 lines
390 B
Bash

#
# Enables local Haskell package installation.
#
# Authors:
# Sebastian Wiesner <lunaryorn@googlemail.com>
#
# Return if requirements are not found.
if (( ! $+commands[ghc] )); then
return 1
fi
# Prepend Cabal per user directories to PATH.
if is-darwin && [[ -d $HOME/Library/Haskell ]]; then
path=($HOME/Library/Haskell/bin(/N) $path)
else
path=($HOME/.cabal/bin(/N) $path)
fi