1

I have a system setup of Haskell that I've maintained with Homebrew and subsequent cabal install invocations for various packages. I would like to take this back to the bare installation created with brew install haskell-stack.

How do I do this? Right now I seem to have a bunch of stuff lying around (e.g. old docsets, executables like ghc-mod etc.) at the system level, even after deleting all installed packages with rm -r ~/.ghc. Is there a reliable way to get back to the basic configuration that brew install haskell-stack creates?

Community
  • 1
  • 1
orome
  • 45,163
  • 57
  • 202
  • 418
  • Remove `~/.stack` and rerun `stack setup`. Keep in mind that `stack install` copies binaries into `~/.local/bin` on Linux, I'm not sure about the location on macOS. – Zeta Dec 28 '16 at 20:29
  • @Zeta: Uh oh! That doesn't seem right. I get "Preparing to install GHC to an isolated location." and "This will not interfere with any system-level installation.". So that just creates a sandboxed installation at the root, which is not at all the same as fixing the root, right? – orome Dec 28 '16 at 20:42
  • @Zeta: In fact, it sounds like doing this [may even have messed up my project-specific installations](https://docs.haskellstack.org/en/v1.0.2/faq/#how-do-i-reset-remove-stack-such-as-to-to-do-a-completely-fresh-build). – orome Dec 28 '16 at 20:45
  • Stack doesn't install anything at system level by default. It will install everything per-user. Note that GHC will be installed if the current LTS version uses another GHC version than the one you've installed. By the way, you can fix the `.stack-work` easily with a single `find` command. – Zeta Dec 28 '16 at 20:54
  • @Zeta: So I'm not sure how any of this cleans things up at the system level then. What I was trying to figure out, is how to get the system level back to what `brew install haskell-stack` does. – orome Dec 28 '16 at 20:58

0 Answers0