From 235cef787e511340efaafc55cecec979886b0683 Mon Sep 17 00:00:00 2001 From: Sebastian Wiesner Date: Sat, 12 May 2012 12:58:47 +0200 Subject: [PATCH] Add haskell module This module provides support for per user haskell packages by prepending the per user directories to PATH/MANPATH. --- modules/haskell/README.md | 28 ++++++++++++++++++++++++++++ modules/haskell/init.zsh | 16 ++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 modules/haskell/README.md create mode 100644 modules/haskell/init.zsh diff --git a/modules/haskell/README.md b/modules/haskell/README.md new file mode 100644 index 0000000..fa770b5 --- /dev/null +++ b/modules/haskell/README.md @@ -0,0 +1,28 @@ +Haskell +======= + +Enables local 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 0000000..9cd85a0 --- /dev/null +++ b/modules/haskell/init.zsh @@ -0,0 +1,16 @@ +# +# Enables local Haskell package installation. +# +# Authors: +# Sebastian Wiesner +# + +# Prepend Cabal per user directories to PATH/MANPATH. +if [[ "$OSTYPE" == darwin* ]]; then + path=($HOME/Library/Haskell/bin(/N) $path) + manpath=($HOME/Library/Haskell/man(/N) $manpath) +else + path=($HOME/.cabal/bin(/N) $path) + manpath=($HOME/.cabal/man(/N) $path) +fi +