Eigenstate: myrddin-dev mailing list

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

Re: regression in example on homepage


Tracked it down -- So the bug was replaced with a segfault.

I fixed the segfault, and now both examples seem to be working. I'll try
to update the website in the near future.

On Sun, 13 Dec 2015 21:49:02 -0800, Ori Bernstein <ori@xxxxxxxxxxxxxx> wrote:

> That's a compiler bug.
> 
> '_' should catch any value of 'a' that isn't 123 or 234, so reporting that
> it's matched by an earlier case is wrong.
> 
> And, on my machine I get a compiler segfault, so that's definitely a compiler bug.
> 
> On Mon, 14 Dec 2015 17:07:12 +1300, Andrew Chambers <andrewchamberss@xxxxxxxxx> wrote:
> 
> > 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")
> >         ;;
> > }
> 
> 
> -- 
>     Ori Bernstein
> 


-- 
    Ori Bernstein

References:
regression in example on homepageAndrew Chambers <andrewchamberss@xxxxxxxxx>
Re: regression in example on homepageOri Bernstein <ori@xxxxxxxxxxxxxx>