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

Design: More expressive type quantities #11

Open
ReedOei opened this issue Jan 13, 2021 · 0 comments
Open

Design: More expressive type quantities #11

ReedOei opened this issue Jan 13, 2021 · 0 comments

Comments

@ReedOei
Copy link
Owner

ReedOei commented Jan 13, 2021

Currently for type quantities, we have empty, any, one, and nonempty.

One simple extension that may be useful is to add every (which used to be in the lanugage) back. One particular use case for this is in filters, where it can be used to assert that the predicate is true for every value in the source. For example,

[ x,y,z] --[ every such that P(_) ]-> Dst

will only succeed when P(x), P(y), and P(z) are all true.

Another possible extension is to replace type quantities with a "bounds" system, so types look something like xs : (>=n, <=m) multiset nat, meaning that n <= size x <= m, where . This gives significantly more expressive power (e.g., empty becomes (>=0, <=0), nonempty becomes (>=1, <=infinity)), but it's unclear what this is actually useful for.

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