This profile script makes ghcup and cabal packages persist across different lab clients, by symlinking the necessary haskell directories.
-
Put the above script inside your "profile" directory to be run on startup:
On the school server:
cd /cs/home/${USER}/.profile.d curl "https://gist.githubusercontent.com/niklasdewally/42c9862ff72fa2f0aa0e8271b2698f3e/raw/fb5c64f1a8ba68de181d933a39d0d2a39987f993/hs-links.sh" > hs-links.sh chmod +x hs-links.shThis will now run on startup on any CS machine, setting up the links to local home.
-
Run this script to setup the symlinks on your current session
./hs-links.sh -
Install ghcup to the default location
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | shEnsure to select Yes to installing Haskell Language Server
-
Restart your terminal