Skip to content

type union position / subtyping lattice traversal #2

@wizzard0

Description

@wizzard0

Is there a description on why mlsub chooses {x: T1|T2, y: T3|T4} over {x:T1,y:T3}|{x:T2,y:T4} when computing a type union of {x:T1,y:T3} and {x:T2,y:T4}?

I understand that both typings are technically correct but want to know whether it is possible to steer the computation so it would produce the second option (union of records instead of record of unions)

Edit: more general question is, how does one encode a different options of traversing the subtyping lattice when there's multiple paths between types?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions