Skip to content
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

Non-record/list values in record/list tail position #32

Open
foxfriends opened this issue Nov 29, 2020 · 0 comments
Open

Non-record/list values in record/list tail position #32

foxfriends opened this issue Nov 29, 2020 · 0 comments
Labels
bug Something isn't working
Projects

Comments

@foxfriends
Copy link
Owner

It is currently possible to cause Lumber to crash by getting a non-record/non-list value into a record/list tail:

test(A, B) :- B <- { a: a, ..A }.
:- test(a, B).

This causes Binding::apply to fail when attempting to extract the value of B.

There is some sort of checking that needs to be done when constructing a list/record that the tail value is valid. There is currently no such construction check. Inserting a step into the generated body right before constructing the record (or before evaluating the body, in the case of a record in head position) could work, but there is still no way to represent that check, maybe until #5.

@foxfriends foxfriends added the bug Something isn't working label Nov 29, 2020
@foxfriends foxfriends added this to RFC in Features via automation Nov 29, 2020
@foxfriends foxfriends moved this from RFC to To do in Features Nov 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

1 participant