I use Arch Linux and all Haskell libraries are dynamically linked. So in order to compile Haskell codes, I need to add the -dynamic flag to the command and configure cabal to do it automatically.
I’ve been playing around with the GHC API, following these
The code itself runs, but always encounter the error
Could not find module ‘Prelude’
There are files missing in the ‘base-4.15.1.0’ package
which I recognize is the same error as that I get if I try to compile haskell without the -dynamic flag. I’ve tried configuring dflags but nothings fixed it. Any advice?