Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Haskell on Windows, cabal config

I'm installing Haskell on Windows based on the instructions at https://www.haskell.org/platform/ and looking at step 3, it says, Modify your cabal config file (you can verify the location by running "cabal user-config init") to contain the following lines:

extra-prog-path: C:\Program Files\Haskell Platform\8.0.2\msys\usr\bin
extra-lib-dirs: C:\Program Files\Haskell Platform\8.0.2\mingw\lib
extra-include-dirs: C:\Program Files\Haskell Platform\8.0.2\mingw\include

But the auto generated config file contains e.g.

extra-prog-path: C:\Users\w\AppData\Roaming\cabal\bin

So that's a different value for one of the suggested variables.

Is this intentional?

What should I do, paste the lines from step 3 at the start of the file, the end of the file, overwrite the existing lines or skip step 3 altogether?

like image 326
rwallace Avatar asked Oct 24 '25 18:10

rwallace


1 Answers

I have cabal-install version 2.4.1.0. As proposed in https://www.haskell.org/cabal/users-guide/nix-local-build.html and contrary to the installing instructions at https://www.haskell.org/platform/windows.html, I'm using one single extra-prog-path line containing a comma separated list of paths:

extra-prog-path: C:\Users\...\AppData\Roaming\cabal\bin,C:\Program Files\Haskell Platform\8.6.5\msys\usr\bin

Reason: Like this, at least the command cabal user-config diff gives reasonable results.

C:\>cabal user-config diff
+ extra-include-dirs: C:\Program Files\Haskell Platform\8.6.5\mingw\include
+ extra-lib-dirs: C:\Program Files\Haskell Platform\8.6.5\mingw\lib
- extra-prog-path: C:\Users\...\AppData\Roaming\cabal\bin
+ extra-prog-path: C:\Users\...\Roaming\cabal\bin,C:\Program Files\Haskell Platform\8.6.5\msys\usr\bin
+ logs-dir: C:\Users\...\AppData\Roaming\cabal\logs

If I'd follow the installing instructions and use two extra-prog-path lines, then cabal user-config diff would ignore the second one. I'm not sure however if this matters.

like image 151
stacchioflo Avatar answered Oct 26 '25 08:10

stacchioflo