AAVSO / VStar

VStar is a visualisation and analysis tool for variable star data brought to you by AAVSO
https://www.aavso.org/vstar
GNU Affero General Public License v3.0
10 stars 3 forks source link

Add refinement types to VeLa #200

Open dbenn opened 2 years ago

dbenn commented 2 years ago

Refinement types ala Wadler's complement to blame, e.g. f(n:real{n>= 0})

dbenn commented 2 years ago

One obvious use case is time parameters.

dbenn commented 1 year ago

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