-
Notifications
You must be signed in to change notification settings - Fork 110
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
Add annotation for table-from-raw-array(), checking arg is indeed a raw array of rows #1759
base: horizon
Are you sure you want to change the base?
Conversation
Thanks! A few tests here would help make it clear what this is for (and verify the right thing is happening automatically): https://github.com/brownplt/pyret-lang/blob/horizon/tests/pyret/tests/test-tables.arr#L653 You can see some similar style of tests (for dynamic annotation-checking errors in the table library) here: https://github.com/brownplt/pyret-lang/blob/horizon/tests/pyret/tests/test-tables.arr#L507 |
Just one test added. Is there more variety needed in this situation? |
This looks like it merely tests that the argument is a raw array; it doesn't check that the elements are checked as well. |
@blerner, are you referring to having a test case that checks that something like
fails? Or are you saying that the predicate I used in I can add the test case above to |
I'm saying you have no test case that fails in the Additionally, implementing the annotation in Pyret as a refinement will give you a lousier error message than if you implemented it as an annotation in JS, as we do in the image library, as I pointed you towards in the original issue. |
- a (second) test that checks all values are raw-rows - one that checks that the raw-rows contain only tuples
Shriram's original example (the one that used a My question had however to do with the other type of error, where the I looked at the |
addresses issue #1758