serras/emacs-haskell-tutorial — pull request #17 by dpkatz (2014-10-24 19:26:19+00:00)
Title: Make paths for calling cabal executables more robust

The current document suggests adding path elements like
```~/.cabal/bin``` (a.k.a. "tilde-paths") to the ```PATH``` environment variable
and the ```exec-path``` variable. I had some trouble with this when using
zsh as my default shell -- in particular, efforts to call hoogle locally
would error out with the message:
> zsh:1: command not found: hoogle

There were no such problems when I used bash as my default shell.

A reasonably robust solution to this problem is to wrap tilde-path
elements like this in a call to ```expand-file-name```, which will expand
them to absolute paths - a situation which I'd expect every shell to
handle properly. (I've tested with both bash and zsh and they, at
least, have no problem with this.)