diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f03b4f4..48baa111 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 0.2.34 +- Added `<=` and `>=` operators. (#451) + ## 0.2.33 - Added `expand_main`, a compilation pass that expands references in the entry point function. (#424) - Changed the `float_combinators` pass to not extract in the entry point function. (#424) @@ -11,4 +14,4 @@ - Created the changelog. ## 0.2.0 -- Initial public release of Bend. \ No newline at end of file +- Initial public release of Bend. diff --git a/Cargo.lock b/Cargo.lock index 0c252c98..be5e144f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -62,7 +62,7 @@ dependencies = [ [[package]] name = "bend-lang" -version = "0.2.33" +version = "0.2.34" dependencies = [ "TSPL", "clap", diff --git a/Cargo.toml b/Cargo.toml index 6ddc0931..83062713 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "bend-lang" description = "A high-level, massively parallel programming language" license = "Apache-2.0" -version = "0.2.33" +version = "0.2.34" edition = "2021" rust-version = "1.74" exclude = ["tests/"] diff --git a/docs/syntax.md b/docs/syntax.md index fff0dddb..758aaca1 100644 --- a/docs/syntax.md +++ b/docs/syntax.md @@ -384,6 +384,7 @@ Therefore, all `bind` functions must call the builtin function `undefer` before This is necessary to ensure that the continuation in recursive monadic functions stays lazy and doesn't expand infinitely. This is an example of a recursive function that would loop if passing the variable `a` to the recursive call `Result/foo(a, b)` was not deferred: + ```python def Result/foo(x, y): with Result: @@ -546,21 +547,23 @@ u24 = 42 Currently, the 3 number types cannot be mixed. -| Operation | Syntax | Supported Types | -| -------------- | -------- | ---------------- | -| Addition | x + y | int, float, uint | -| Subtraction | x - y | int, float, uint | -| Multiplication | x \* y | int, float, uint | -| Division | x / y | int, float, uint | -| Remainder | x % y | int, float, uint | -| Exponentiation | x \*\* y | float | -| Equal | x == y | int, float, uint | -| Not Equal | x != y | int, float, uint | -| Less Than | x < y | int, float, uint | -| Greater Than | x > y | int, float, uint | -| Bitwise And | x & y | int, uint | -| Bitwise Or | x \| y | int, uint | -| Bitwise Xor | x ^ y | int, uint | +| Operation | Syntax | Supported Types | +| --------------------- | -------- | ---------------- | +| Addition | x + y | int, float, uint | +| Subtraction | x - y | int, float, uint | +| Multiplication | x \* y | int, float, uint | +| Division | x / y | int, float, uint | +| Remainder | x % y | int, float, uint | +| Exponentiation | x \*\* y | float | +| Equal | x == y | int, float, uint | +| Not Equal | x != y | int, float, uint | +| Less Than | x < y | int, float, uint | +| Greater Than | x > y | int, float, uint | +| Less Than or Equal | x <= y | int, float, uint | +| Greater Than or Equal | x >= y | int, float, uint | +| Bitwise And | x & y | int, uint | +| Bitwise Or | x \| y | int, uint | +| Bitwise Xor | x ^ y | int, uint | ### Constructor Literals @@ -1026,6 +1029,7 @@ Therefore, all `bind` functions must call the builtin function `undefer` before This is necessary to ensure that the continuation in recursive monadic functions stays lazy and doesn't expand infinitely. This is an example of a recursive function that would loop if passing the variable `a` to the recursive call `Result/foo(a, b)` was not deferred: + ```python Result/foo x y = with Result { ask a = (Result/Ok 1) @@ -1078,21 +1082,23 @@ u24 = 42 Currently, the 3 number types cannot be mixed. -| Operation | Syntax | Supported Types | -| -------------- | ---------- | ---------------- | -| Addition | (+ x y) | int, float, uint | -| Subtraction | (- x y) | int, float, uint | -| Multiplication | (\* x y) | int, float, uint | -| Division | (/ x y) | int, float, uint | -| Remainder | (% x y) | int, float, uint | -| Exponentiation | (\*\* x y) | float | -| Equal | (== x y) | int, float, uint | -| Not Equal | (!= x y) | int, float, uint | -| Less Than | (< x y) | int, float, uint | -| Greater Than | (> x y) | int, float, uint | -| Bitwise And | (& x y) | int, uint | -| Bitwise Or | (\| x y) | int, uint | -| Bitwise Xor | (^ x y) | int, uint | +| Operation | Syntax | Supported Types | +| --------------------- | ---------- | ---------------- | +| Addition | (+ x y) | int, float, uint | +| Subtraction | (- x y) | int, float, uint | +| Multiplication | (\* x y) | int, float, uint | +| Division | (/ x y) | int, float, uint | +| Remainder | (% x y) | int, float, uint | +| Exponentiation | (\*\* x y) | float | +| Equal | (== x y) | int, float, uint | +| Not Equal | (!= x y) | int, float, uint | +| Less Than | (< x y) | int, float, uint | +| Greater Than | (> x y) | int, float, uint | +| Less Than or Equal | (<= x y) | int, float, uint | +| Greater Than or Equal | (>= x y) | int, float, uint | +| Bitwise And | (& x y) | int, uint | +| Bitwise Or | (\| x y) | int, uint | +| Bitwise Xor | (^ x y) | int, uint | ### Character Literal