I'm using HaskellPlatform-2012.4.0.0 on Win7. It's installed as portable. Paths are managed through .bat file so ghci and ghc works. Cabal config and folder are made semi-portable with this.
The problem is ghc
folder. It installs itself in C:\Users\name\AppData\Roaming\ghc\i386-mingw32-7.4.1.
How to change it's default path? So I can have really portable Haskell on windows :)
EDIT: There are 3 new system variables that do nothing. Here are results:
SET APPDATA=%~dp0AppData -- has no effect. ghc is still made in roaming
SET USERPROFILE=%~dp0 -- kills cabal
SET LOCALAPPDATA=%~dp0Local --not sure if this is ever used.
kills cabal error link
Then start up Haskell, use the :cd command to change to your home directory or subdirectory, then the :load command to load the file. Try things out. If you want to edit your file, do so and save it, and then back in Haskell reload the file using :reload.
If you have installed the Haskell Platform, open a terminal and type ghci (the name of the executable of the GHC interpreter) at the command prompt. Alternatively, if you are on Windows, you may choose WinGHCi in the Start menu. And you are presented with a prompt. The Haskell system now attentively awaits your input.
The version number of your copy of GHC can be found by invoking ghc with the --version flag (see Verbosity options). The compiler version can be tested within compiled code with the MIN_VERSION_GLASGOW_HASKELL CPP macro (defined only when CPP is used).
Run the command "$ sudo apt-get install haskell-platform" and press Enter. It will automatically start downloading Haskell on your system after authenticating you with the root password. After installing, you will receive a confirmation message. Step 4 − Go to your terminal again and run the GHCI command.
You could try SET USERPROFILE=%~dp0
while making sure that the folder structure supports what Cabal expects. It is probably attempting to go to %USERPROFILE%AppData\Roaming
or something similar.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With