Closed larsrh closed 6 years ago
I tried extracting the above example from the CakeML source, but for me, the datatype gets correctly renamed; the "id" identifier is in isabelle_constants.
Do you maybe have the LEMLIB environment variable set to a path that does not have an isabelle_constants file?
Thanks, I see. I had misunderstood your patch: I thought specifying -lib LEM=...
is sufficient, i.e. LEMLIB
is not required any longer, but I call it as follows now, which works:
LEMLIB="$LEM_LIBRARY" "$LEM_BINARY" -lib LEM="$LEM_LIBRARY" -isa -use_datatype_record -outdir "$GENERATED_TARGET" "${CAKEML_LEM_FILES[@]}"
Ah, yes, the standard library is still handled separately. The usage message for the -lib command line flag could probably be improved; what about the following:
" add a library path, in addition to the standard library at '"^(default_library)^"'. To change the latter, set the LEMLIB environment variable. Directories in the library path may optionally be associated with Isabelle session names, e.g. -lib MyLib=path/to/mylib. The standard library is associated with the session name LEM by default."
If you have suggestions to improve the wording, let me know.
By the way, I think the -lib flag in your call above is not really necessary, since the LEM session name should be known by default.
Sounds good, thanks! And yes, it works without the flag.
After updating to d82f8c7911e4c07e8fe4fd6f7685866537ad6d38, code like this gets emitted:
(The diff describes the output of 11c8efae4dbbd3b8867f40bcb28cfb1d52a7d54f vs. d82f8c7911e4c07e8fe4fd6f7685866537ad6d38.)
This does not work because
id
is an existing constant.