fathom icon indicating copy to clipboard operation
fathom copied to clipboard

Incorrect elaboration of record literals?

Open Kmeakin opened this issue 1 year ago • 0 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};

Kmeakin avatar Sep 06 '23 23:09 Kmeakin