-
Notifications
You must be signed in to change notification settings - Fork 238
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
Issues with identifiers in DM4F affecting extraction #1001
Comments
modulo some bugs with names generated in DM4F which are not valid in OCaml (#1001)
I think this might be fixed in my branch Just making a note so we don't forget. |
FYI the code to find a good name for a given let-bound variable is there: https://github.com/FStarLang/FStar/blob/master/src/extraction/FStar.Extraction.ML.UEnv.fs#L193 so you could conceivably change this code to make sure it doesn't shadow anything, but also to make sure it picks a valid OCaml identifier. |
That sounds like a good change too! But should we really have these kind of names generated by DM4F? They're also invalid F* names, it just doesn't matter only since it's all internal to the compiler (as far as I understand) |
in case some internal F* identifiers are not valid in OCaml,this should do the trick of fixing it up c.f. #1001
Pushed a change as per Jonathan's suggestion to the |
Not caught by the #1001 fix, apparently...
Some names used internally in DM4F are not valid OCaml identifiers, causing syntax errors in the extracted code. The examples I've hit so far are:
examples/dm4free/FStar.DM4F.Exceptions.fst
, for effectEXN
, extractinglet EXN___proj__EXN__item__raise_elab e uu____234 = ...
^
or-
(e.g.g^w
)Some quick fixes would be to either generate these names slightly differently in DM4F or to modify them afterwards if extracting.
The text was updated successfully, but these errors were encountered: