This article describes how to install and correctly path Haskell and its core libraries on a Windows machine. (Including Stack and Cabal).
- Navigate to the link: https://www.haskell.org/platform/windows.html
- Select "Download Core (64 bit)"
- Keep selecting next until you come to this screen and ensure that the install path is as shown:
- Select standard for the type of install:
- Keep Start Menu for Haskell Platform's shortcuts and select "Install".
- When promted with the stack setup, set the directory as depicted here:
- Select all components to install:
- Select install then finish.
Once the installation is complete, find the location of the cabal folder by opening command prompt and typing in "cabal user-config init"
Copy the path given, without the "\cabal\config" at the end, and paste it in explorer
- Cut the cabal folder out of the directory and paste it to this directory: "C:\Program Files\Haskell Platform"
- Once it is succesfully moved, open the cabal folder, and then open the config file with a text editor.
- In the config file find the following tags along the left side and replace their right side content with the given:
- extra-prog-path: C:\Program Files\Haskell Platform\8.2.2\msys\usr\bin
- extra-lib-dirs: C:\Program Files\Haskell Platform\8.2.2\mingw\lib
extra-include-dirs: C:\Program Files\Haskell Platform\8.2.2\mingw\include
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).
- 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:
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.