Open dbenn opened 2 years ago
One obvious use case is time parameters.
A variable could have such constraints added as well, e.g.
phase:real{phase > 0 and phase < 1} <- 42
although the syntax would require some thought. The code above would give an error, as would the following on the second line:
phase:real{phase > 0 and phase < 1} <- 0.1
phase <- 42
Refinement types ala Wadler's complement to blame, e.g.
f(n:real{n>= 0})