-
Notifications
You must be signed in to change notification settings - Fork 14
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
Refactor/typed lifted #226
Conversation
@marzipankaiser it would be very valuable to get a review from you. In particular, I simply duplicated |
It looks like my last commit broke the build. However, I think it is only a symptom of something broken in machine. Function types should take one evidence parameter for the function itself -- this is how our translation currently work. Maybe machine assumed that it does not? We get the following error (only introduced by changing the translation of types to add one evidence parameter for the function itself):
@marzipankaiser Do you have an idea how this can happen? |
I don't really see how we can avoid that duplication as long as we have it in the Tree. The Scala types used by |
Machine probably assumes the types it gets are core types, so the evidence parameters are added twice - once in lift inference and once by machine. At least that would be my first guess. |
That's what I guessed, but I also touched all places where |
@marzipankaiser do you think you could look into the machine/LLVM issue or do you think this is something @phischu needs to do? Is it difficult to check whether this also affects the JIT backend? |
Yes, but there are some places where we create evidence parameters from thin air in the machine translation IIRC. |
I am looking into it. If it affects LLVM, it will most likely affect JIT, too - I could try to merge them locally later. |
Do you have a particular place where you expect this to happen; I could not find it. |
Turns out I was wrong: The problem seems to be the calculation of effekt/effekt/shared/src/main/scala/effekt/machine/Transformer.scala Lines 70 to 82 in 1c1b4a0
Here, (the same) |
I think I found the issue: |
Thanks for the analysis @marzipankaiser. I turned the list of names for evidence parameters into a list of "Unit" (a natural number... / arity) to make sure structural equality still holds. |
As discussed in person, I am going ahead and merge this. We need to
|
No description provided.