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

Disabling certain actions on constructor and relation #483

Open
FTRobbin opened this issue Dec 6, 2024 · 0 comments
Open

Disabling certain actions on constructor and relation #483

FTRobbin opened this issue Dec 6, 2024 · 0 comments

Comments

@FTRobbin
Copy link
Collaborator

FTRobbin commented Dec 6, 2024

With #461, we now have constructor and relation besides function. However, it is still allowed to do semantically dubious operations on them, and this leaks the underlying implementation details.

(sort foo)
(constructor bar (i64) foo)
(set (bar 0) (bar 1)) ; This currently creates then unions the two terms
(relation baz (i64 i64))
(let x (baz 0 1)) ; This creates the edge and binds `x` to unit

We want to forbid this kind of behavior.

A straightforward fix is to add those restrictions on the subtypes for those actions. The challenge is to make sure all cases are covered.

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

No branches or pull requests

1 participant