We need to apply all the constraints to the AST tree. Easiest way is probably to make all the nodes mutable
let p = (1, 2.0, "foobar")
type Pt = {x: Float64, y:Float64} let p = Pt(10.0, 20.0) let q = Pt(x=10.0, y=20.0) let x = p.x let y = q.y
let x = Point3(1, 2, 3)
let x = Point3(x=1, z=3, y=2)
type Day = {WeekDay: Int8 + Saturday + Sunday} let p = Day.Saturday let q = Day.Sunday let v = match p: Weekday(n): n Saturday: 6 Sunday: 7
let p : {Int32 | String} = if rand_bool () { 1 } else { "zero" } p + 3 # TypeError: (p:Int32|String) + Int32 let result = match p: (n:Int32): n + 3 (n:String): int s + 3
let p = Pt(3.0, 4.0) let s = "asdf" length s length p
Flesh out some required features by creating a library that wraps libpcre2