I have run into a strange ghci addLibrarySearchPath error message with Haskell Platform 8.4.2 and 8.4.3 full on a Windows 10 Pro version 1803 machine. Here is an example transcript on a fresh installation of Haskell Platform 8.4.3, where ghci was started immediately after the installation finished:
C:\Users\Admin>ghci
GHCi, version 8.4.3: http://www.haskell.org/ghc/ :? for help
Prelude> import System.Random
Prelude System.Random> randomIO
ghc.exe: addLibrarySearchPath: D:\GitHub\haskell-platform\build\ghc-bindist\local\mingw\lib (Win32 error 3): The system cannot find the path specified.
-7101299332192590302
The message pops up the first time certain IO actions happen in a ghci session (it's not just those from System.Random). I have read of similar errors when ghc is looking for paths in an older Haskell Platform location, such as the error described in https://ghc.haskell.org/trac/ghc/ticket/14183. However, in my case, that D:\GitHub folder has never existed at all - it's a removal drive that has nothing installed on it. The fixes I've read for the similar addLibrarySearchPath errors involved redoing cabal sandboxes or reinstalling; no sandbox has been made in this case and reinstalling made no difference. Between uninstalling and reinstalling, I cleared away the local, cabal, and ghc folders that always get left behind in AppData\Roaming. While the error message technically doesn't stop ghci from working after it shows up, I would really like to know what's causing it.
Any insight on this would be greatly appreciated. The problem does not happen with Haskell Platform either 8.2.1 or 8.2.2 full. It's only the two later platform versions that exhibit the behavior.