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 *inlined* refined syntax for structs #559

Merged
merged 3 commits into from
Nov 15, 2023

Conversation

nilehmann
Copy link
Member

Now we can write

flux_rs::flux! {

struct Range refined by [a: int, b: int]
{
    start: i32[a],
    end: {i32[b] | b >= a},
}

fn test(r: Range[@a, @b]) -> i32{v: v >= 0} {
    r.end - r.start
}

}

@nilehmann nilehmann merged commit 6f00769 into main Nov 15, 2023
4 checks passed
@nilehmann nilehmann deleted the nico/refined-struct-in-flux-macro branch November 15, 2023 00:26
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 this pull request may close these issues.

1 participant