-
Notifications
You must be signed in to change notification settings - Fork 22
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
Export discriminant values in AdtDef
#693
Conversation
How does this compare to the field Anyway, the Shall we merge |
Yeah, it's a recipe for how to compute the
👍
I guess we could do that; I don't have a use for |
Nice, let's do so then. Do you want to do it? In hax engine we rely on |
If you feel like doing it, please do. Otherwise I'll do it myself in a day or two when I'm finished with other things |
Marking as draft while I do this |
90fd071
to
f109cdb
Compare
This PR is ready, and so is the corresponding charon change: AeneasVerif/charon#255 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
92d24b6
to
5f44786
Compare
The discriminant is the runtime integer value used to identify a given enum variant. It's the value on which we do a
SwitchInt
. This PR makes hax export them.I would have prefered a
discriminant
field inVariantDef
but that would have been tricky to fit into theSInto
scheme.