I'd like to have similar functionality as stack install
(e.g. the --copy-bins
flag) does for executables, but for libraries.
Currently, I have to stack build
and then manually find the libHS*-<version>-<fingerprint>.a
files in .stack-work
. That is problematic/uncomfy for two reason:
- I have to rely on the internal folder structure of stack (reliable enough, though)
- I have to manually get rid of the fingerprint and the version
Well, I could work around both, I guess, but I'd like to know if this might already be available/sensible to implement.
Some background, which may or may not be relevant to the question rather than to its motivation:
I am playing around with https://hackage.haskell.org/package/dynamic-loader-0.0/docs/System-Plugins-DynamicLoader.html and want to provide as realistic an example as I can, so I plan to compile a package's object code into a *.a
(containing the compilation of multiple modules) which I want to link in at runtime.
What I want to do works already for trivial single module files, where I only need to use loadModule
. Currently I'm tinkering around with loadPackage
.