Skip to content

Stackage Server FAQ

Chris Done edited this page Aug 12, 2014 · 15 revisions

How do I clear my existing environment?

If you already have installed some packages from Hackage or elsewhere and you want to start from a fresh package set, you can remove your ~/.ghc/<os>-<ghc-version> directory.

For example, in my directory .ghci I have:

$ ls ~/.ghc/ x86_64-linux-7.2.2 x86_64-linux-7.4.2 x86_64-linux-7.6.2 x86_64-linux-7.6.3 x86_64-linux-7.8.2

If I want to clear my GHC 7.2.2. environment, all the user-installed packages, I can remove the directory x86_64-linux-7.2.2. Be careful that you are sure that you want to clear your package set (re-installing packages takes time!) and that you clear the right one.

On Windows the .ghc directory might be in a directory like C:\Documents and Settings\HaskellCurry\.

Now you can set Stackage as your remote-repo and run cabal update.

How do I use it with sandboxes?

hsenv

With hsenv you can simply edit the .cabal/config file and replace the remote-repo line with the line indicated on the page of the snapshot you want to use.

Cabal sandbox

There is currently no way to specify a remote-repo in a sandbox yet. There is an open issue for this. Once it is addressed you'll be able to have a snapshot per sandbox. Until then, you can either use a stackage globally, or embed your sandbox inside hsenv.