Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use env var to get ghc libdir #98

Merged
merged 1 commit into from
Jan 12, 2021
Merged

Use env var to get ghc libdir #98

merged 1 commit into from
Jan 12, 2021

Conversation

jneira
Copy link
Contributor

@jneira jneira commented Jan 12, 2021

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:

  • parseModuleFromString and parseModuleApiAnnsWithCpp in Language.Haskell.GHC.ExactPrint.Parsers
  • and in a dozen of functions in Test.Transform (we dont have to worry about those ones)
  • a pair of functions in InsertSignature (it is an example and we can ignore them)

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 😄

@alanz
Copy link
Owner

alanz commented Jan 12, 2021

I will hold my nose and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants