How To Install Haskell Core on Windows

This article describes how to install and correctly path Haskell and its core libraries on a Windows machine. (Including Stack and Cabal). 

Downloading Core:

  1. Navigate to the link: https://www.haskell.org/platform/windows.html
     
  2. Select "Download Core (64 bit)"


     
  3. Keep selecting next until you come to this screen and ensure that the install path is as shown:


     
  4. Select standard for the type of install:


     
  5. Keep Start Menu for Haskell Platform's shortcuts and select "Install".
     
  6. When promted with the stack setup, set the directory as depicted here:


     
  7. Select all components to install:


     
  8. Select install then finish.
     
  9. Once the installation is complete, find the location of the cabal folder by opening command prompt and typing in "cabal user-config init"



     

  10. Copy the path given, without the "\cabal\config" at the end, and paste it in explorer
     

  11. Cut the cabal folder out of the directory and paste it to this directory: "C:\Program Files\Haskell Platform"
     
  12. Once it is succesfully moved, open the cabal folder, and then open the config file with a text editor.
     
  13. In the config file find the following tags along the left side and replace their right side content with the given:
    1. extra-prog-path: C:\Program Files\Haskell Platform\8.2.2\msys\usr\bin
    2. extra-lib-dirs: C:\Program Files\Haskell Platform\8.2.2\mingw\lib
    3. extra-include-dirs: C:\Program Files\Haskell Platform\8.2.2\mingw\include

      Note:

      You do not have to replace the lines that contain the left side tags (ie. the given extra-prog-path does not have to overwrite the existing extra-prog-path in the config file).

  14. Finally, search for the shortcut folder by typing in WinGHCi in the start menu search bar and create public desktop shortcuts by copying the shortcuts:
    1. GHCi
    2. WinGHCi
    to: "C:\Users\Public\Desktop"