yeslogic / fathom

🚧 (Alpha stage software) A declarative data definition language for formally specifying binary data formats. 🚧

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect elaboration of record literals?

Kmeakin opened this issue · comments

// synthesises type `fun (A: Type) (B : Type) -> {x: A, y: B}`
def good_id = fun (A: Type) (B: Type) (p: {x: A, y: B}) =>
    ({x = p.x, y = p.y} : {x : A, y : B});

// synthesises type `fun (A: Type) (B : Type) -> {x: A, y: p}`!
def bad_id = fun (A: Type) (B: Type) (p: {x: A, y: B}) =>
    {x = p.x, y = p.y};