You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
even though a similar line is already present in the generated .c file.
These declarations should go where any standard C declarations go; in a .h header file, so that the user does not have to guess the right signature themselves. In the case of bar`, which the user must implement themselves anyway, this will result in an error message at compile time if the user implements the wrong signature by accident, rather than a crash at runtime.
An optional extension of this would be to generate C++-enabled header files like
Proposal
When working with the Lean FFI, the user is instructed to add code along the lines of
If the user additionally has functions like
then they have to write
even though a similar line is already present in the generated
.c
file.These declarations should go where any standard C declarations go; in a
.h
header file, so that the user does not have to guess the right signature themselves. In the case of bar`, which the user must implement themselves anyway, this will result in an error message at compile time if the user implements the wrong signature by accident, rather than a crash at runtime.An optional extension of this would be to generate C++-enabled header files like
which also captures the
@&
borrow information.Community Feedback
Ideas should be discussed on the Lean Zulip prior to submitting a proposal. Summarize all prior discussions and link them here.
Impact
Add 👍 to issues you consider important. If others benefit from the changes in this proposal being added, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: