-
-
Notifications
You must be signed in to change notification settings - Fork 391
Unboxed tuple error when importing a module with no-specialise
#771
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
Comments
I think worker/wrapper can produce unboxed tuples, which will probably usually be specialized away. So I can see how this would happen if we're not compiling B with reduced enough optimization settings to prevent that. |
Just for my understanding, do either B or A contain any TH? ghcide is certainly trying to disable optimisation, but maybe the setting is getting overridden later on: |
They both do. Not sure if it matters! |
Why would ghcide go through the trouble of generating byte code otherwise? |
So hypothesis is we compile the module to byte code to generate TH. But something interferes and turns the optimisation up sufficiently high that the bytecode contains unboxed tuples? @michaelpj - do you have any |
Not AFAICT. I'll experiment some more and see if anything affects it. One thing I tried to try and pin it down:
That works fine, which I would have thought corresponds to the ghcide situation. |
Ghcide and Cabal Repl are about a million miles apart nowadays - entirely feasible for it to work with one but not the other. Is it likely we can get a minimal reproducer? |
Sure, I just wanted to establish that it's not Totally Broken but only broken in ghcide (and therefore plausible that this is a bug rather than me making a mistake). I'll try and boil this down, not sure when I'll get to it. |
Okay, I definitely need to boil this down, it seems to be non-deterministic too :( |
Which probably invalidates my claim that removing |
If you can reproduce this on the command line with |
I haven't seen this in ages |
I have modules A and B. A imports B, and B has
OPTIONS_GHC -fno-specialise
.ghcide
gives me the following error onA
(but not B). The error goes away if I remove theno-specialise
on B.I remembered this because I saw Ben Gamari report something similar on IRC, not sure if it's the same.
The text was updated successfully, but these errors were encountered: