Statically link C++ library with a Haskell library
问题 Setup: I have a Haskell library HLib which makes calls to a C/C++ backend CLib for efficiency. The backend is small and specialized for use with HLib . The interface to CLib will only be exposed through HLib ; HLib tests, HLib benchmarks and third party libraries depending on HLib will not make direct FFI calls to CLib . From the test/benchmark/3rd party lib perspective, HLib should be appear purely Haskell. This means in the cabal file sections for, e.g., HLib tests, there should be no