On 18 Sep 2014, at 22:20, Yotam Barnoy <yotambarnoy@gmail.com> wrote:
> I have a question about opam. I would like to play with certain compiler versions, but I don't want the switch to happen globally, because I still need to compile regular code. Is it possible to switch to another compiler locally (within a particular shell session) via environment variables, while using my regular compiler in another shell session?
>
> If this is the way things work already, I apologize in advance -- it appeared to me that running opam switch modifies some global state that directly affects other pre-existing shell sessions.
It's worth reading the man page for OPAM ("man opam" or "opam --help"), which lists all the environment variables and command-line options available.
There is OPAMSWITCH (or the command line --switch option) which will fix a particular switch to run the opam command set in.
best,
Anil