alanz / ghc-exactprint

GHC version of haskell-src-exts exactPrint
BSD 3-Clause "New" or "Revised" License
70 stars 32 forks source link

Use env var to get ghc libdir #98

Closed jneira closed 3 years ago

jneira commented 3 years ago

the direct solution i can think off is pushing the ghc wrapper (better then the libdir location imo) or the data that is extracted using it (dynflags and...) downstream and require client code to provide it, in a new function (or several), falling back to the actual one

But the ghcWrapper is used in:

Create duplicate versions of both parse* and push them downstream (in the lib and the downstream packages) will be non trivial. Using the system env as a global variable is dirty (but arguably better than the fixed at compiled time actual libdir) but quick and dont require changes in downstream packages.

I am not pride of this so i will understand if it is not accepted :smile:

alanz commented 3 years ago

I will hold my nose and merge.