Skip to content

Releases: thautwarm/MLStyle.jl

ML Core

04 Mar 10:00
Compare
Choose a tag to compare

A complete core library for ML style programming is ready.

enhancement for ADTs/GADTs, active patterns and capturing

02 Mar 10:25
Compare
Choose a tag to compare
  • Fixed subtyping of ADT/GADT
  • Enhanced the implicit conversion for GADTs
  • Allowed capturing by uppercase symbols, via enabling UppercaseCapturing
  • Allowed ML style enumerations and view/active patterns

v0.2.7

20 Feb 13:24
Compare
Choose a tag to compare
fix typo

When destructuring

10 Feb 13:23
Compare
Choose a tag to compare

The documentations are more exhaustive than before, and something like if-let in Rust is finally introduced in.

@when (a, 1) = tp begin
     a + 1
end

@when let (a, 1) = tp,
               f = x -> x + 1
    f(a)
end

Speed up literal string patterns and fix a bug of unexpected capturing

03 Feb 17:54
Compare
Choose a tag to compare
  • Improve string pattern performance
@match str begin
   "This" => ...
end

Now we use === instead of == to make string comparisons at julia v1.1+.

  • Avoid to regard symbol nothing as as-pattern:
    A bug occurred at the previous version, where nothings are not treated as literals, so following assertion used to fail.
@assert @match 1 begin
    nothing => false
    _ => true
end # => 

Solved via defining a special pattern before capturing to handle with this.

only bugfix and code style refinement

01 Feb 14:53
32bc71e
Compare
Choose a tag to compare
  • fix ADT/GADT constructor issues
  • fix GADT implicit conversion issues
  • fix exception handling issues
  • refine code style

dictionary matching for null-value cases.

25 Jan 14:41
Compare
Choose a tag to compare

only bugfix

24 Jan 09:29
Compare
Choose a tag to compare

Fix a bug that used to occur when there is single ... as the argument of Expr pattern.

@match begin Expr(:a, :b) begin
    Expr(a...) => a
end

tiny optimization

23 Jan 09:54
Compare
Choose a tag to compare

At this release, we avoid redundant unpacking when compiling Expr patterns.

A benchmark script have been available,
which tells that MLStyle.jl is almost 30 times faster than MacroTools.jl when matching ASTs.

Regularly it's about 20 times faster than Match.jl when performing pattern matching for Expr.

0.2.0 preview

23 Jan 07:06
Compare
Choose a tag to compare
0.2.0 preview Pre-release
Pre-release

New features

  • GADTs
  • Ast patterns
  • Active patterns
  • And patterns instead of as-patterns