- Install stack.
- Run
stack setup
as a normal user. This will install GHC for you (under~/.stack
). - Run
stack ghci
to start ghci. Please see the rest of the page linked above on how to use stack to create and build projects.
Last active
December 13, 2017 21:01
-
-
Save ion1/2815423 to your computer and use it in GitHub Desktop.
Installing GHC under the home directory
- Install
libgmp-dev
or equivalent using the system package manager. - Add
export PATH="$HOME/.ghc/bin:$HOME/.cabal/bin:$HOME/.cabal-sandbox/bin:$PATH"
to your.profile
/.zprofile
. - Also run the command above now.
- Get the GHC binary tarball and extract it.
./configure --prefix="$HOME/.ghc" && make install
- Get the cabal-install source tarball and extract it.
EXTRA_CONFIGURE_OPTS=-p sh bootstrap.sh
cabal update
- Add
library-profiling: True
anddocumentation: True
to~/.cabal/config
.- Add
require-sandbox: True
if you want to prevent accidental installation of packages outside a sandbox.
- Add
rm -fr ~/.ghc ~/.cabal
- Remove the
export PATH…
line from your.*profile
.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment