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
Add %ffi as variation of %raw with arity checking. (#6251)
* Begin exposing %raw arity
Only print to stderr for now?
See #6213
* Use %ffi attribute and handle arity zero
Move to using `%ffi` extension to avoid breaking changes, and begin checking arity zero.
For a JS function of arity 0, check that the ReScript type is `unit => _`.
* Check all arities and make error message gpt3.5-proof.
Extend arity check to all arities.
Iterate on the error message so gpt3.5 can figure out a correct fix when given the error message with no context.
* One more example.
* cleanup
* format
* comment
* Update CHANGELOG.md
Copy file name to clipboardexpand all lines: CHANGELOG.md
+4
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,10 @@
12
12
13
13
# 11.0.0-beta.2 (Unreleased)
14
14
15
+
#### :rocket: New Feature
16
+
17
+
- Introduced a new `%ffi` extension that provides a more robust mechanism for JavaScript function interoperation by considering function arity in type constraints. This enhancement improves safety when dealing with JavaScript functions by enforcing type constraints based on the arity of the function. [PR #6251](https://github.com/rescript-lang/rescript-compiler/pull/6251)
0 commit comments