I want to first point out the layout that works well for me, and then suggest how you might proceed in your particular situation.
What works well for me
In general, I think that a better layout is to have the following search path:
- directories with important non-Haskell related binaries
- directory that
cabal install
installs to
- directory that binaries from the Haskell platform are in
This way, you can use cabal install
to update binaries from the Haskell platform, but they cannot accidently shadow some non-Haskell related binary.
(On my Windows machine, this layout is easy to achieve, because the binaries from the Haskell platform are installed in a separate directory by default. So I just manually adapt the search path and that's it. I don't know how to achieve it on other platforms).
Suggestion for your particular situation
In your specific situation with the Haskell platform binaries already installed together with the non-Haskell related binaries, maybe you can use the following layout for the search path:
- directory containing links to some of the binaries in 3
- directory with important non-Haskell related binaries and Haskell platform binaries
- directory that
cabal install
installs to.
This way, binaries from cabal install
cannot accidently shadow the important stuff in 2. But if you decide you want to shadow something form the Haskell platform, you can manually add a link to 1. If it's a soft link, I think you only have to do that once per program name, and then you can call cabal install
for that program to update it. You could even look up what executables are bundled with the Haskell platform and do that once and for all.