I'm working on a Haskell program which runs under Windows. It uses a number of foreign mingw libraries. I've got a global installation in C:\msys64 which I can manage using plain pacman. However I want to be sure that the DLLs I package in my installation file are the same as the DLLs that GHC is linking with.
This page in the Stack documentation says that on Windows Stack comes with an installation of msys2, and you can manage this installation by doing things like:
stack exec -- pacman -S mingw64/mingw-w64-x86_64-icu
Looking through my AppData\Local\Programs\stack folder I can see the various GHC installations, each of which has its own mingw folder. There is also a msys2-20180531 folder which seems to be global to my installation of Stack: it sits alongside the GHC installations rather than inside. After running the stack exec line above I was able to locate the ICU libraries in the latter msys2 installation. I also have a copy of the same libraries in my C:\msys64 installation, which also contains other foreign libraries my program uses.
Which copy of the ICU libraries are going to be picked up by GHC when I run stack install? Does it search the Stack installation first, followed by the C:\msys64 installation?