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

Implement contracts for records and enums #157

Closed
yannham opened this issue Oct 8, 2020 · 0 comments · Fixed by #169
Closed

Implement contracts for records and enums #157

yannham opened this issue Oct 8, 2020 · 0 comments · Fixed by #169
Assignees

Comments

@yannham
Copy link
Member

yannham commented Oct 8, 2020

Describe the bug
Currently, the builtin contracts for row types are not implemented yet. This means that row types are unusable at runtime, since any term which is a Promise or Assume with a row type in the annotation leads to a panic if evaluated.

To Reproduce
Write an Assume or a Promise that is consumed during evaluation:

nickel <<< 'Assume({ {| a: Num |} }, {a = 1})'
thread 'main' panicked at 'TODO implement', src/types.rs:241:41

Expected behavior
We expect contracts to be implemented for enums and records, making the previous code to evaluate without errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant