GHC.SysTools.BaseDir.findToolDir "/" on Windows results in infinite loop
Summary
Calling GHC.SysTools.BaseDir.findToolDir "/"
on Windows results in
*** Exception: ghc-9.2.1.exe: could not detect mingw toolchain in the following paths:
when run in GHCi, followed by GHCi hanging, and in <<loop>>
when compiled.
This bit me when I still had initSettings "/"
for testing purposes but forgot about it - the non-terminating error-message wasn't very helpful in reminding me.
Expected behavior
Something along the lines of
*** Exception: ghc-9.2.1.exe: could not detect mingw toolchain in the following paths: ["/mingw", "/../mingw", "/../../mingw", "/../../../mingw"]
Environment
- GHC version used: 9.2.1
- Operating System: Windows 10
- System Architecture: x86_64
Edited by Jakob Brünker