Skip to content

Instantly share code, notes, and snippets.

@gautamr
Last active October 13, 2017 10:12
Show Gist options
  • Save gautamr/7d4c558b389f7400977b3060fb19b7be to your computer and use it in GitHub Desktop.
Save gautamr/7d4c558b389f7400977b3060fb19b7be to your computer and use it in GitHub Desktop.
Haskell installation - Win 7_64
#1 Download Haskell platform from https://www.haskell.org/platform/. Select 64 bit Windows version .exe
#2 Remove any previous Haskell installation - haskell home, cabal directory. Uninstall stack with uninstall-stack.exe inside C:\Users\User\AppData\Roaming\local\bin
#3 Run the installer. Don't select any PATH change autometically during installation. Not for stack also. Don't select auto creation of STACK_ROOT
#4 Create HASKELL_HOME, STACK_HOME and STACK_ROOT system variable with proper path. Add that to PATH manually.
HASKELL_HOME=C:\Haskell Platform\8.2.1
STACK_HOME=C:\Haskell Platform\stack
STACK_ROOT=C:\Haskell Platform\stack\sr
Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;%JAVA_HOME%\bin;%GIT_HOME%\cmd;%GIT_HOME%\bin;%M2_HOME%\bin;%GRADLE_HOME%\bin;%AMAZON_HOME%\AWSCLI\;%NPM_HOME%;%NODEJS_HOME%;%RUBY_HOME%\bin;C:\GNU\GnuPG\pub;C:\scala\bin;C:\sbt\bin;%HADOOP_HOME%\bin;%HADOOP_HOME%\sbin;%SPARK_HOME%\bin;%ATOM_HOME%\bin;%EMACS_HOME%\bin;%ASPELL_HOME%\bin;%R_HOME%\bin;%ANACONDA_HOME%;%ANACONDA_HOME%\Scripts;%HASKELL_HOME%\bin;%HASKELL_HOME%\lib\bin;%HASKELL_HOME%\lib\extralibs\bin;%HASKELL_HOME%\mingw\bin;%STACK_HOME%
#5 Initilize cabal
cabal user-config init
this will create folder and file config under C:\Users\User\AppData\Roaming\cabal
#6 Modify config
extra-prog-path: C:\Haskell Platform\8.2.1\msys\usr\bin
extra-lib-dirs: C:\Haskell Platform\8.2.1\mingw\lib
extra-include-dirs: C:\Haskell Platform\8.2.1\mingw\include
#7 Upgrade stack
stack upgrade
#8 Update information in config.yaml file in STACK_ROOT folder. If this file does not exist then it will be created when you will run stack project or stack setup.
Console info should be useful in this case
templates:
params:
author-name: gautamr
author-email: gautam.2005@gmail.com
copyright: Gautam Roy
github-username: gautamr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment