Skip to content

Allow multiple inputs in a match #49

Description

@PatrickMatthiesen

It would be nice if we could allow something like the following, so we don't have to create a tuple and project into it:

    match x, y with
    | Some (z), Some (w) -> ()
    | _ -> ()

With tuple we currently get:

    match (x,y) with
    | (Some (z), Some (w)) -> ()
    | _ -> ()

with an ast like:

...
let scrut71 = Ctor0(x, y) in
  match scrut71 with
  | #0 let tuple_left73 = proj_0 scrut71 in
       inc tuple_left73;
       let tuple_right72 = proj_1 scrut71 in
       inc tuple_right72;
       dec scrut71;
       match tuple_right72 with
       | #1 dec tuple_right72;
            match tuple_left73 with
            | #1 dec tuple_left73;
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions