-
-
Notifications
You must be signed in to change notification settings - Fork 648
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
update table of known good syms for contracts #4779
base: master
Are you sure you want to change the base?
Conversation
I wonder why we hard code the list, instead of generating it at compile-time. Is the generation too expensive? |
No idea. We should ask @rfindler |
It does sound like something I'd have tried, but I don't know if I did or why I gave up! As for the entries, I'm not sure about functions like |
Some of the existing entries raise errors though, like |
Another one that already was in the list is |
I took a closer look and I don't see how raising these errors could break what And maybe the reason I didn't do this programmatically was because I was worried about errors but since they were already there, perhaps it is possible to autogenerate the list by just looking at the arity of exports from |
As for test cases, much of the contract system's test suite is already using stuff that'll end up in this list. So we might want to add a few test cases of procedures that aren't in this list in various places (locally defining some function with a note that the test case is there precisely for that reason). |
Looking over the code, it seems like there could be better use of the known-good contracts, too. Right now, it looks like they're used only in Right now there are some obstacles there, as a new set of functions that are like There's also the "plus-one-acceptor" route (these functions are generated when |
Checklist
Description of change
I'm updating the table of known good symbols/predicates for contracts. Some are new primitives added during this years, other are comparisons that now can have a single argument, and there are a few special cases that don't have a
?
, for examplenot
and=
.I'm not sure about the title of the commit:
Does this need test? Where should they be?
I'll squash both commits before merging. The difference is that the first is an automatic update using the code in helpers.rkt and the second is a manual list.