Using cabal with multiple GHC versions

后端 未结 5 1022
粉色の甜心
粉色の甜心 2020-12-18 19:50

I got both ghc6 and ghc7 on my desktop. To install new packages (for the specific ghc version), I use cabal with the flag --with-compiler=<

5条回答
  •  渐次进展
    2020-12-18 20:36

    I thought --with-ghc is the appropriate option. I use to have multiple ghc versions on my machine. They all have different names like ghc-6.12.3 or ghc-7.4.1. They are usually installed with these names and a default compiler is chosen by creating symbolic links from, say, ghc to ghc-7.4.1. I think you do not need different cabal directories for different ghc versions. Cabal creates a ghc-6.12.3 subdirectory of lib/yourpkg for GHC-6.12.3 files and so on. Also cabal update does not update installed packages, it only fetches the current package list from your favorite package servers. This should be the same for all installed compilers.

提交回复
热议问题