diff --git a/modules/haskell/README.md b/modules/haskell/README.md new file mode 100644 index 00000000..90111dc1 --- /dev/null +++ b/modules/haskell/README.md @@ -0,0 +1,27 @@ +Haskell +======= + +Enables per user Haskell package installation. + +Per-user Package Installation +----------------------------- + +[`cabal`][1], the Haskell package manager, can install packages into per user +directories. + +This module prepends per user directories to the relevant path variables to +enable the execution of user installed executables and the reading of +documentation. + +### Usage + +Install packages into per user directories with `cabal install --user`. + +Authors +------- + +*The authors of this module should be contacted via the GitHub issue tracker.* + + - [Sebastian Wiesner](/lunaryorn) + +[1]: http://www.haskell.org/cabal/ diff --git a/modules/haskell/init.zsh b/modules/haskell/init.zsh new file mode 100644 index 00000000..6b61f336 --- /dev/null +++ b/modules/haskell/init.zsh @@ -0,0 +1,15 @@ +# +# Enables user installation of haskell packages +# +# Authors: +# Sebastian Wiesner +# + +# Prepend cabal per user directories to PATH/MANPATH +if [[ "$OSTYPE" == darwin* ]]; then + path=($HOME/Library/Haskell/bin $path) + manpath=($HOME/Library/Haskell/man $manpath) +else + path=($HOME/.cabal/bin $path) + manpath=($HOME/.cabal/man $path) +fi