• v4.2.0 Stable

    zxq9 released this 2020-01-15 19:58:47 +09:00 | 263 commits to master since this release

    Added

    • Allow separate entrypoint/function type signature and definition, and pattern
      matching in left-hand sides:
        function
          length : list('a) => int
          length([])      = 0
          length(x :: xs) = 1 + length(xs)
      
    • Allow pattern matching in list comprehension generators (filtering out match
      failures):
        function somes(xs : list(option('a))) : list('a) =
          [ x | Some(x) <- xs ]
      
    • Allow pattern matching in let-bindings (aborting on match failures):
        function test(m : map(int, int)) =
            let Some(x) = Map.lookup(m, 0)
            x
      

    Changed

    • FATE code generator improvements.
    • Bug fix: Handle qualified constructors in patterns.
    • Bug fix: Allow switching also on negative numbers.
    Downloads