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

Allow wider usage of ^ operator #31

Open
SSoelvsten opened this issue May 31, 2020 · 0 comments
Open

Allow wider usage of ^ operator #31

SSoelvsten opened this issue May 31, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@SSoelvsten
Copy link
Owner

Currently we only allow the ^ operator to be used directly on variables with a star-type. In most other cases it is not necessary, but one might as well allow a wider usage.

  • Allow ^ on non-star type (treat is as a reference to whatever distance it has)
let eta1 : float[3] = Lap(1/3);
let eta2 : float[^eta1] = Lap(1/3);
  • Allow ^ on expressions (infer the distance by the exp typing rules)
let eta3 : float[^(eta1 + eta2)] = Lap(1/3);

As before ^ should only be allowed within a distance, not within the expressions

@SSoelvsten SSoelvsten added the enhancement New feature or request label May 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant