0

Installing Idris on Windows 10 using instructions to:

  • Install Haskell following this
  • Replaced , with ; in multiline paths of config files as reported by @gergelybat in this
c:\Users\me\cabal update
c:\Users\me\cabal install idris

Several dependency errors arise, I follow Idris' instructions to apply with blind faith the following further flags

----reinstall       
--avoid-reinstalls  
--force-reinstalls  
--upgrade-dependencies

Progress is made things begin to be built, we get all the way to building a temp directory with something called idris-1.3.1\…\setup.exe Then we crash with following error:

C:\Users\me\AppData\Local\Temp\cabal-tmp-26128\idris-1.3.1\dist\setup: removeDirectoryRecursive:
…": unsatisfied constraints (The directory is not empty.)

Googling this I find this same error happens across cabal installs and logged as issues on oodles of GitHub projects. Theories are all over the map and no solutions provided. The Haskell documentation on removeDirectoryRecursive offers a clue ending with the remark that this fails on Windows if the directory is a symbolic-link.

How does one get past this problem to finish an install?

Algeboy
  • 270
  • 2
  • 9
  • 1
    Does it work if you try with Stack? You can run `stack install --resolver lts-12.26 idris`. I chose that resolver based on the information on this page: https://www.stackage.org/package/idris – Michael Snoyman Mar 22 '19 at 05:52
  • This came close (I think) but failed in the last step hit same issued documented [here](https://github.com/commercialhaskell/stack/issues/3089 ). More to figure out. – Algeboy Mar 24 '19 at 03:35

2 Answers2

1

This is mostly to record the steps that worked, thanks to Michael Sonyman for the major tip.

Steps to follow.

  1. Install Haskell (with Stack) following this
  2. Replace , with ; in multiline paths of config files as reported by @gergelybat in this
  3. Check that you have a version of make by checking stack exec -- which make
    • if you get no make then install GnuWin32,
    • ensure that the install directory for (e.g. c:\Program Files (x86)\GnuWin32\bin is added to your system path (follow "set environment variables").
    • Restart PowerShell/Command prompt, retry step 3, you should see a make found, if not recheck your steps.
  4. Run stack install --resolver lts-12.26 idris … this may be very slow. It ends by copying the Idris compiler and other items to C:\Users\you\AppData\Roaming\local\bin:
  5. Test by typing idris at prompt, it should load the Idris REPL.

Enjoy dependent typing for the rest of your programming life.

Algeboy
  • 270
  • 2
  • 9
0

You could try using cabal new-build or cabal new-install, but I am not sure if that will work.

  • yeah, I tried new- versions but they hit the same issue. It seems `removeDirectoryRecursive` throws up its hands and whatever program is calling it isn't prepared to handle that. I wouldn't even care to have the temp files stay and not be deleted if I could get the rest to run. – Algeboy Mar 22 '19 at 01:57