Hey there! I’m just getting into Haskell and I’m trying to get the compiler working, but I’m having an issue.
I’m on Linux and I have my gmp
library installed to ~/.local/lib
because I’m not root on my machine and can’t install system packages.
I can compile a hello world program if I run ghc -L$HOME/.local/lib hello.hs
, but I want to add -L$HOME/.local/lib
as a default linker argument so that I don’t have to pass it in every time I compile a haskell program.
Are there any environment variables or configurations I can set to add global linker flags?
It looks like haskell packages have a way to add linker flags, so maybe I can make a dummy package that adds to the linker search path, and then just install it?