r/haskell • u/theInfiniteHammer • 8d ago
How do you get stack to output a shared library in the project root directory.
I'm trying to write a haskell library that will be called up by a lisp script. So far I think I've gotten it to compile to a shared library (I think) but I don't know how to get it to save the shared object to where I want it. I tried using the -o option in ghc-options for the library in package.yaml but then it complains that there's no Main module.
5
Upvotes
2
u/jeffstyr 7d ago
I don’t have a direct answer but if you can’t get it to output directly to where you want, you can probably get it to tell you where it’s putting it, and then copy it to the desired location yourself (or via whatever you are using to drive the compilation, if it’s a script or something).