Match.jl icon indicating copy to clipboard operation
Match.jl copied to clipboard

Advanced Pattern Matching for Julia

Results 20 Match.jl issues
Sort by recently updated
recently updated
newest added

As suggested in https://github.com/JuliaServices/Match.jl/issues/96#issuecomment-1767516997, support some syntax like `@ismatch (vars=A,B,C) [10,9,8] ( ...` to list the variables to be assigned at the start of the block e.g. such that unmatched...

enhancement

I didn't see this in the docs so I assume it's not possible. It would be really nice to be able to match NamedTuples, e.g. ```julia @match (;a=1, b=2) begin...

enhancement

This is supported: ``` xs = [1,2,3] @match xs begin [x,y,z] => ... ... end ``` but not this: ``` xs = [1,2,3] @match xs begin Int[x,y,z] => ... ......

enhancement

See the documentation about "active patterns" in [MLStyle](https://thautwarm.github.io/MLStyle.jl/latest/syntax/pattern.html#active-patterns) and [F#](https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/active-patterns). We should consider supporting those.

enhancement

in [MLStyle](https://thautwarm.github.io/MLStyle.jl/latest/), a guard is written ```julia @match e begin pattern && if condition end => value end ``` We should support that as well.

enhancement

The following example in the documentation fails to compile. The error message is `The type `Person` has 3 fields but the pattern expects 1 fields.` ``` personinfo(person) = @match person...

bug

I am thinking since a while, that it would be nice and very julian to match general functional expressions if the inverse of the function is provided, for example ```...

enhancement

The 2.0 update broke patterns that look like `a.b`. Having these patterns is useful for working with `EnumX` enums because they have to be accessed through their generated module. With...

documentation

See this part of an automaton: ``` Node 33 5: («input_value» isa Tuple && «length(input_value)» := length(«input_value») && «length(input_value)» >= 2 && «input_value[-1]» := «input_value»[-1] && «where_0» := e.q1 &&...

optimization