indeed, isn't the usual fix to make sure you've got the "dev" version of the package name installed?
Not here; libgmp.so.10 isn't going to match libgmp.so.3 regardless. And it's not determined while building a Haskell program, unless that program is the ghc you are going to use to build other Haskell programs.