Eigenstate: myrddin-dev mailing list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

regression in example on homepage


Running the examples on the homepage, one has stopped working. Here is the
minimized failure. It prints  'pattern matched by earlier case' referring
to the .a patterns.


use std

type s = struct
        a : int
        b : (int, int)
;;

const main = {
        var v : s
        v = [.a = 123, .b=(5, 10)]
        match v
        | [.a = 234]:              std.put("Should not be here\n")
        | [.a = 123, .b=(x, y)]:   std.put("tuple is ({}, {})\n", x, y)
        | _:                       std.put("No matches: Generic case\n")
        ;;
}

Follow-Ups:
Re: regression in example on homepageOri Bernstein <ori@xxxxxxxxxxxxxx>