I know that the GHC API grants me the use as a library, access to the compiler features such as analyzing, running, and transforming Haskell codes. A Haskell program that imports the GHC as a package will, when compiled, include its own (partial) copy of the GHC, thus being executable even on systems without the GHC installed.
But what if I don't want to include the GHC in the program and, instead, use the one that is installed on the system?
So that, when the program is given a Haskell code, it will use the system's GHC to understand it and, when necessary, import all the packages and libraries (ones that are available on the GHCi) as well.
You can require the end-user install either BuildWrapper or scion and then interact with those programmatically. If you don't want to force that users install them, you can bundle their code with your executable, and have the executable call the system GHC to build them yourself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With