Search code examples
haskelldependenciescabalcabal-install

Why can't cabal keep multiple versions of the same package?


Coming from Ruby where I can have as many versions of every gem as I want, it's confusing to me why there is the restriction of Cabal being able to only have one version installed at the same time?

I've tried searching for an answer, but couldn't find anything explaining the reasoning behind this. And another good question would be if is there a workaround to this other than using sandboxes, which require me to recompile everything for every project (or share the sandbox, which doesn't always work).

edit: To clarify this question, what I don't understand is how cabal gets to the point where it says that installing a package would break another package. What is the cause of this issue?

I know it can be fixed by using a sandbox, but that's not an answer to the cause of this problem.


Solution

  • Your assumption is incorrect: cabal does allow installation of multiple versions of the same package. Packages are distinguished by version number.