I need to know what the mpi dependency actually means
The line extra-libraries: mpi
means that Cabal will add -lmpi
to the ld linker options. In addition, tools that process headers will search in the include paths.
So, how do we help GHC and binutils find that library?
According to the wiki, assuming you have mingw or msys,
If you need to link to C-software, define an environment variable C_INCLUDE_PATH that lists the directories where the header files can be found. For linking the libraries you need to define an environment variable LIBRARY_PATH as well, listing the directories where .a and .lib files can be found.
So try setting the paths to include the path to the headers and libraries.