init.zsh 430 B

12345678910111213141516171819202122
  1. #
  2. # Enables local Haskell package installation.
  3. #
  4. # Authors:
  5. # Sebastian Wiesner <lunaryorn@googlemail.com>
  6. #
  7. # Return if requirements are not found.
  8. if (( ! $+commands[ghc] )); then
  9. return 1
  10. fi
  11. # Load dependencies.
  12. pmodload 'helper'
  13. # Prepend Cabal per user directories to PATH.
  14. if is-darwin && [[ -d $HOME/Library/Haskell ]]; then
  15. path=($HOME/Library/Haskell/bin(/N) $path)
  16. else
  17. path=($HOME/.cabal/bin(/N) $path)
  18. fi