repo stringlengths 5 53 | pr_number int32 1 321k | task_type stringclasses 2
values | issue_text stringlengths 0 81.2k | pr_title stringlengths 1 319 | pr_body stringlengths 0 105k | base_sha stringlengths 40 40 | head_sha stringlengths 40 40 | gold_diff stringlengths 0 202M | changed_files listlengths 0 100 | review_threads listlengths 0 100 | test_patch stringlengths 0 23.4M | merged bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
HigherOrderCO/Bend | 743 | comment_to_fix | Updates builtin type Map so that it stores Maybes in its nodes. | ```suggestion
- **Node { value ~left ~right }**: Represents a map node with a `Maybe` and `left` and `right` subtrees. Empty nodes have `Maybe/None` stored in the `value` field, whilst non-empty nodes have `Maybe/Some` stored in the `value` field.
``` | efc3b38137e8ad43aea10c55e0fd8d6371754c90 | 88db4e4589c55ac1a530084b325067cc12b87c98 | diff --git a/docs/builtins.md b/docs/builtins.md
index fc4733411..ee6f4c170 100644
--- a/docs/builtins.md
+++ b/docs/builtins.md
@@ -161,19 +161,44 @@ tree = ![![!1, !2],![!3, !4]]
```
Technically your trees don't need to end with leaves, but if you don't, your program will be very hard to reason about.
+## Maybe
... | [
"docs/builtins.md"
] | [
{
"comment": "```suggestion\r\n- **Node { value ~left ~right }**: Represents a map node with a `Maybe` and `left` and `right` subtrees. Empty nodes have `Maybe/None` stored in the `value` field, whilst non-empty nodes have `Maybe/Some` stored in the `value` field.\r\n```",
"path": "docs/builtins.md",
"h... | true | ||
HigherOrderCO/Bend | 743 | comment_to_fix | Updates builtin type Map so that it stores Maybes in its nodes. | The internal representation of Map is not really interesting for the tests, only the interfaces to it. When possible, try to return just a simple value, otherwise it's hard to understand if the snapshot is correct or not. | efc3b38137e8ad43aea10c55e0fd8d6371754c90 | 88db4e4589c55ac1a530084b325067cc12b87c98 | diff --git a/tests/snapshots/prelude__get_values_from_map.bend.snap b/tests/snapshots/prelude__get_values_from_map.bend.snap
new file mode 100644
index 000000000..bfb008eaf
--- /dev/null
+++ b/tests/snapshots/prelude__get_values_from_map.bend.snap
@@ -0,0 +1,6 @@
+---
+source: tests/golden_tests.rs
+input_file: tests/g... | [
"tests/snapshots/prelude__get_values_from_map.bend.snap"
] | [
{
"comment": "The internal representation of Map is not really interesting for the tests, only the interfaces to it. When possible, try to return just a simple value, otherwise it's hard to understand if the snapshot is correct or not.",
"path": "tests/snapshots/prelude__get_values_from_map.bend.snap",
... | true | ||
HigherOrderCO/Bend | 744 | issue_to_patch | Small updates for new versions of rustc and clippy | d81078208dfc5871464e73e1d817004dc4fc5a2c | ff0812e043b0c7c1f0dc3eff692de497d364790a | diff --git a/docs/compiler-options.md b/docs/compiler-options.md
index a7f6fb76..71d817b6 100644
--- a/docs/compiler-options.md
+++ b/docs/compiler-options.md
@@ -7,7 +7,7 @@
| `-Oeta` `-Ono-eta` | Disabled | [eta-reduction](#eta-reduction) |
| `-Op... | [
"docs/compiler-options.md",
"src/diagnostics.rs",
"src/fun/check/unbound_vars.rs",
"src/fun/parser.rs",
"src/fun/term_to_net.rs",
"src/hvm/prune.rs"
] | [] | true | |||
HigherOrderCO/Bend | 732 | issue_to_patch | update numbers and operations tables | in order to match [HVM2.pdf](https://github.com/HigherOrderCO/HVM/blob/654276018084b8f44a22b562dd68ab18583bfb5b/paper/HVM2.pdf) section 6.6 | 71fb68004e076b8dd1f6ae4bfd2dff7f995b46b1 | 9d29d2925dd10997ebd04d9500c0b06c2e63c109 | diff --git a/docs/syntax.md b/docs/syntax.md
index f13b2c60..76e80c8e 100644
--- a/docs/syntax.md
+++ b/docs/syntax.md
@@ -600,6 +600,8 @@ Currently, the 3 number types cannot be mixed.
| Bitwise And | x & y | int, uint |
| Bitwise Or | x \| y | int, uint |
| Bitwise Xor ... | [
"docs/syntax.md"
] | [] | true | ||
HigherOrderCO/Bend | 737 | issue_to_patch | Add warning for unreachable rule in pattern matching functions
Consider this program
```
(Bool/not Bool/true) = Bool/False
(Bool/not Bool/False) = Bool/True
```
The second rule is not actually reachable because we mispelled `True` in the first one, so it's taken as a variable pattern.
Users have no indicatio... | Add warning for unreachable pattern matching rules | f467effc99a230504c3780b84f81bd45c50f8338 | a3378e2bc1b25edb5a4322bb406cae3d88c3a848 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0b84da7f..771cd93f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,8 +7,12 @@ and this project does not currently adhere to a particular versioning scheme.
## [Unreleased]
+### Added
+
+- Emit a warning when a rule in a pattern matching function is unreachable. ([#... | [
"CHANGELOG.md",
"src/fun/transform/desugar_match_defs.rs",
"tests/golden_tests.rs",
"tests/snapshots/simplify_matches__adt_tup_era.bend.snap",
"tests/snapshots/simplify_matches__already_flat.bend.snap",
"tests/snapshots/simplify_matches__double_unwrap_box.bend.snap",
"tests/snapshots/simplify_matches__i... | [] | diff --git a/tests/golden_tests.rs b/tests/golden_tests.rs
index cf6cd3a2..52bd8edd 100644
--- a/tests/golden_tests.rs
+++ b/tests/golden_tests.rs
@@ -245,7 +245,9 @@ fn readback_hvm() {
fn simplify_matches() {
run_golden_test_dir(function_name!(), &|code, path| {
let diagnostics_cfg = DiagnosticsConfig {
- ... | true | |
HigherOrderCO/Bend | 735 | issue_to_patch | Type checking allows incorrect match term
### Reproducing the behavior
The following program type-checks when it shouldn't
```
type Nat_:
Zero
Succ {x: Unit, pred: Nat_}
type Unit:
Unit
Test1: Nat_ -> (Nat_, Nat_)
Test1 = λx match x {
Nat_/Zero: (Nat_/Zero, Nat_/Zero)
Nat_/Succ: (x.x, x.pred)
... | Fix type checker not substituting type var when unifying match arms | 71fb68004e076b8dd1f6ae4bfd2dff7f995b46b1 | f9e6893ae99b02cde561a607d7f1d5a9b38941b1 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 608ed60d..0b84da7f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project does not currently adhe... | [
"CHANGELOG.md",
"src/fun/check/type_check.rs",
"tests/golden_tests.rs",
"tests/golden_tests/check_file/fail_type_bad_rec_fn_adt.bend",
"tests/golden_tests/check_file/non_exaustive_limit.bend",
"tests/golden_tests/check_file/type_err_match_arm.bend",
"tests/snapshots/check_file__fail_type_bad_rec_fn_adt.... | [] | diff --git a/tests/golden_tests.rs b/tests/golden_tests.rs
index b47270d6..cf6cd3a2 100644
--- a/tests/golden_tests.rs
+++ b/tests/golden_tests.rs
@@ -9,7 +9,7 @@
//! CLI tool. Then, run `cargo insta review` to review these changes.
use bend::{
- compile_book, desugar_book,
+ check_book, compile_book, desugar_boo... | true | |
HigherOrderCO/Bend | 730 | issue_to_patch | Fix Tree/Leaf and Tree/Node not capitalized in syntax.md | 9da1f49f890c754ee8687730ccd1fad8cb976804 | 04ef9414463dc2fff0d9aeedc7f10b2b972bf64a | diff --git a/docs/syntax.md b/docs/syntax.md
index 25d5d03c..f13b2c60 100644
--- a/docs/syntax.md
+++ b/docs/syntax.md
@@ -291,10 +291,10 @@ It is possible to bind a variable name to the matching value. The fields of the
### Fold
```python
-fold x = Tree/leaf:
- case Tree/node:
+fold x = Tree/Leaf:
+ case Tree/No... | [
"docs/syntax.md"
] | [] | true | |||
HigherOrderCO/Bend | 705 | issue_to_patch | Performance degradation on Bitonic Sort output since release
### Reproducing the behavior
On release, the Bitonic Sort example:
```
def gen(d, x):
switch d:
case 0:
return x
case _:
return (gen(d-1, x * 2 + 1), gen(d-1, x * 2))
def sum(d, t):
switch d:
case 0:
return t... | #634 Don't eta-reduce by default for cuda | 0945efcafa84b399e23534d9d5c0194b97168f2a | 5764f148029d8892e2f6050a4c65311397f71e06 | diff --git a/Cargo.lock b/Cargo.lock
index 890183d65..8556640f1 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -62,7 +62,7 @@ dependencies = [
[[package]]
name = "bend-lang"
-version = "0.2.36"
+version = "0.2.37-alpha.1"
dependencies = [
"TSPL",
"clap",
diff --git a/src/lib.rs b/src/lib.rs
index 209d32bf2..88f18... | [
"Cargo.lock",
"src/lib.rs",
"src/main.rs",
"tests/golden_tests/cli/gen_hvm_no_eta_by_default.args",
"tests/golden_tests/cli/gen_hvm_no_eta_by_default.bend",
"tests/snapshots/cli__gen_hvm_no_eta_by_default.bend.snap",
"tests/snapshots/cli__net_size_too_large.bend.snap",
"tests/snapshots/cli__no_check_n... | [] | diff --git a/tests/golden_tests/cli/gen_hvm_no_eta_by_default.args b/tests/golden_tests/cli/gen_hvm_no_eta_by_default.args
new file mode 100644
index 000000000..9c23af410
--- /dev/null
+++ b/tests/golden_tests/cli/gen_hvm_no_eta_by_default.args
@@ -0,0 +1,2 @@
+gen-hvm
+tests/golden_tests/cli/gen_hvm_no_eta_by_default.... | true | |
HigherOrderCO/Bend | 731 | issue_to_patch | Increase version to 0.2.37 | a085978acdb60016405692a07970058f22b77651 | c0e4469ef5b5cbc4afff74fbb8ff9a621ea683dd | diff --git a/CHANGELOG.md b/CHANGELOG.md
index c865d7ab..608ed60d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project does not currently adher... | [
"CHANGELOG.md",
"Cargo.lock",
"Cargo.toml"
] | [] | true | |||
HigherOrderCO/Bend | 726 | issue_to_patch | String/decode_utf8 returns "\0" when decoding a empty List
### Reproducing the behavior
Strings in bend are not terminated with the null character, but the string decode function returns one when passing an empty list.
```py
def main:
return String/decode_utf8([])
```
When run, this returns:
```
Result: "\... | Fix `String/decode_utf8` returning a non-empty string when given an empty list | Previously calling `(String/decode_utf8 [])` would return `"\0"`. This PR makes it return `""`, adds this case to `utf8.bend` and updates the snapshot.
Fixes #701 | 4d6f461d54e43c4aa9bfde14fdc611e235184129 | 524adfef0b903ff25faa62936bbdfd417dfb5694 | diff --git a/src/fun/builtins.bend b/src/fun/builtins.bend
index baa3a102..29d94f0e 100644
--- a/src/fun/builtins.bend
+++ b/src/fun/builtins.bend
@@ -561,7 +561,9 @@ Utf8/REPLACEMENT_CHARACTER : u24 = '\u{FFFD}'
# Decodes a sequence of bytes to a String using utf-8 encoding.
# Invalid utf-8 sequences are replaced ... | [
"src/fun/builtins.bend",
"tests/golden_tests/io/utf8.bend",
"tests/snapshots/io__utf8.bend.snap"
] | [] | diff --git a/tests/golden_tests/io/utf8.bend b/tests/golden_tests/io/utf8.bend
index b3e16168..80618d6e 100644
--- a/tests/golden_tests/io/utf8.bend
+++ b/tests/golden_tests/io/utf8.bend
@@ -5,5 +5,6 @@ v2 = (to-and-back "(λf ((λx (f (x x))) (λx (f (x x)))))")
v3 = (to-and-back "🌟")
v4 = (to-and-back "Hello 🌎!")
v... | true |
HigherOrderCO/Bend | 728 | issue_to_patch | Resolve type constructors in the types of constructor fields | 4d6f461d54e43c4aa9bfde14fdc611e235184129 | 6fb0a0bc42ec3fe72945661aba180dd3861ad453 | diff --git a/src/fun/check/type_check.rs b/src/fun/check/type_check.rs
index a06935c11..8bcb8be27 100644
--- a/src/fun/check/type_check.rs
+++ b/src/fun/check/type_check.rs
@@ -24,15 +24,15 @@ impl Ctx<'_> {
type ProgramTypes = HashMap<Name, Scheme>;
/// A type scheme, aka a polymorphic type.
-#[derive(Clone)]
+#[d... | [
"src/fun/check/type_check.rs",
"src/fun/net_to_term.rs",
"src/fun/transform/resolve_type_ctrs.rs",
"tests/golden_tests/desugar_file/fail_type_bad_rec_fn_adt.bend",
"tests/snapshots/desugar_file__fail_type_bad_rec_fn_adt.bend.snap"
] | [] | diff --git a/tests/golden_tests/desugar_file/fail_type_bad_rec_fn_adt.bend b/tests/golden_tests/desugar_file/fail_type_bad_rec_fn_adt.bend
new file mode 100644
index 000000000..9ff448210
--- /dev/null
+++ b/tests/golden_tests/desugar_file/fail_type_bad_rec_fn_adt.bend
@@ -0,0 +1,12 @@
+# Should give a type error in Era... | true | ||
HigherOrderCO/Bend | 725 | issue_to_patch | Fix Ctr patterns not being renamed in imports | Solves #724 | 53d52626eac4c4591c4346af3e85e1bca718d39b | 882d17804bd44569d496d8340671fe920359a7db | diff --git a/src/imports/book.rs b/src/imports/book.rs
index 8ed6c0f5..67a171be 100644
--- a/src/imports/book.rs
+++ b/src/imports/book.rs
@@ -2,7 +2,7 @@ use super::{BindMap, ImportsMap, PackageLoader};
use crate::{
diagnostics::{Diagnostics, DiagnosticsConfig},
fun::{
- parser::ParseBook, Adt, AdtCtr, Book,... | [
"src/imports/book.rs",
"tests/golden_tests/import_system/import_type.bend"
] | [] | diff --git a/tests/golden_tests/import_system/import_type.bend b/tests/golden_tests/import_system/import_type.bend
index b79c33fa..fae91d64 100644
--- a/tests/golden_tests/import_system/import_type.bend
+++ b/tests/golden_tests/import_system/import_type.bend
@@ -1,7 +1,11 @@
from lib/MyOption import (MyOption, MyOptio... | true | |
HigherOrderCO/Bend | 723 | issue_to_patch | type checking does not play well with imports
### Reproducing the behavior
Example:
Running command: bend check main.bend
With code:
**a.bend**
```
type MyType:
A
Foo: MyType -> MyType
(Foo MyType/A) = MyType/A
```
**main.bend**
```
from a import *
main = "hello world"
```
Error.:
``... | Correctly apply the import rename to ADTs | Fixes #722 | 71e2600275949f7756f188739f0b308c3873109a | 7b518b7d7501ccaf028afb7ff065d867690866ab | diff --git a/src/fun/transform/encode_adts.rs b/src/fun/transform/encode_adts.rs
index 7a612f7a..4127f226 100644
--- a/src/fun/transform/encode_adts.rs
+++ b/src/fun/transform/encode_adts.rs
@@ -58,7 +58,7 @@ fn encode_ctr_num_scott<'a>(ctr_args: impl DoubleEndedIterator<Item = &'a Name>
Term::rfold_lams(term, ctr_a... | [
"src/fun/transform/encode_adts.rs",
"src/imports/book.rs",
"tests/golden_tests/import_system/import_type.bend",
"tests/golden_tests/import_system/lib/MyOption.bend"
] | [] | diff --git a/tests/golden_tests/import_system/import_type.bend b/tests/golden_tests/import_system/import_type.bend
index f2908c28..b79c33fa 100644
--- a/tests/golden_tests/import_system/import_type.bend
+++ b/tests/golden_tests/import_system/import_type.bend
@@ -1,6 +1,6 @@
from lib/MyOption import (MyOption, MyOption... | true |
HigherOrderCO/Bend | 631 | issue_to_patch | Add a type system to Bend
**Is your feature request related to a problem? Please describe.**
Bend already assumes by the semantics of ADTs and matches that users are writing programs within the contraints of some kind of polymorphic lambda calculus type system.
This is not enforced anywhere since bend is currently... | #615 Add an optional type system to Bend | a5054e4c4ed3874561a9ddb2875e5c2cd826fb09 | 55f8d8783fe89614d93f71617d3d1751baa13689 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index f4dbfc433..c865d7abc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,7 @@ and this project does not currently adhere to a particular versioning scheme.
### Added
+- Add type system for Bend. ([#615][gh-615], [#679][gh-679], see [Type Checking](docs/type-chec... | [
"CHANGELOG.md",
"cspell.json",
"docs/syntax.md",
"docs/type-checking.md",
"examples/bubble_sort.bend",
"examples/callcc.bend",
"examples/example_fun.bend",
"examples/fib.bend",
"examples/fusing_not.bend",
"examples/gen_tree.bend",
"examples/hello_world.bend",
"examples/insertion_sort.bend",
... | [] | diff --git a/tests/golden_tests.rs b/tests/golden_tests.rs
index 618e55270..b47270d62 100644
--- a/tests/golden_tests.rs
+++ b/tests/golden_tests.rs
@@ -1,7 +1,20 @@
+//! This module runs snapshot tests for compiling and running Bend programs.
+//!
+//! The result of each test is saved as a snapshot and used as golden ... | true | |
HigherOrderCO/Bend | 714 | issue_to_patch | Refactor Transform String Resugar Term Scott | #713
* Create struct to wrap user-provided cons handling functions, implementing the trait.
* Implement struct to handle default cons patterns, also implementing the trait.
* Replace with type, better expressing success or failure semantics.
* Utilize Rust's pattern matching and method to simplify error han... | d91742e73b108ba1a3423e27114961813416de1c | f680237093609c1dd12c528964d46f70a325f61e | diff --git a/src/fun/transform/resugar_string.rs b/src/fun/transform/resugar_string.rs
index 031bdf0f..ec47533c 100644
--- a/src/fun/transform/resugar_string.rs
+++ b/src/fun/transform/resugar_string.rs
@@ -4,107 +4,101 @@ use crate::{
};
impl Term {
- /// Converts lambda-encoded strings ending with String/nil to ... | [
"src/fun/transform/resugar_string.rs"
] | [
{
"comment": "This is specifically the \"num-scott\" encoding, you shouldn't apply it for all cases",
"path": "src/fun/transform/resugar_string.rs",
"hunk": "@@ -7,101 +7,132 @@ impl Term {\n /// Converts lambda-encoded strings ending with String/nil to a string literals.\n pub fn resugar_strings(&m... | true | ||
HigherOrderCO/Bend | 712 | issue_to_patch | Fix UTF-8 decoding on 4-byte characters | Solves #711 | a5054e4c4ed3874561a9ddb2875e5c2cd826fb09 | 6d471a9c53863c8a10a55f1608eb5724715138f8 | diff --git a/src/fun/builtins.bend b/src/fun/builtins.bend
index cca33de5..2b11ae4e 100644
--- a/src/fun/builtins.bend
+++ b/src/fun/builtins.bend
@@ -498,7 +498,7 @@ Utf8/decode_character (List/Cons a (List/Cons b (List/Cons c (List/Cons d rest))
} else {
if (== (& a 0xF8) 0xF0) {
let r = (|... | [
"src/fun/builtins.bend",
"tests/golden_tests/io/utf8.bend",
"tests/snapshots/io__utf8.bend.snap"
] | [] | diff --git a/tests/golden_tests/io/utf8.bend b/tests/golden_tests/io/utf8.bend
new file mode 100644
index 00000000..b3e16168
--- /dev/null
+++ b/tests/golden_tests/io/utf8.bend
@@ -0,0 +1,9 @@
+to-and-back s = (String/decode_utf8 (String/encode_utf8 s))
+
+v1 = (to-and-back "hi")
+v2 = (to-and-back "(λf ((λx (f (x x)))... | true | |
HigherOrderCO/Bend | 707 | issue_to_patch | Filter is never reduced
### Reproducing the behavior
```
type Bool:
T
F
def filter(f, ls):
match ls:
case List/Nil:
return List/Nil
case List/Cons:
match f(ls.head):
case Bool/T:
return List/Cons(ls.head, filter(f, ls.tail))
case Bool/F:
ret... | Fix lambda body parsing | f3be26b2c85a44486a78f0141b8b7f16b58e2f52 | ca458c872445756bff852e841b9cf4c552b1bec4 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index fc748f27e..f4dbfc433 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,7 @@ and this project does not currently adhere to a particular versioning scheme.
- Fix imported constructors not being updated to Constructor expression. ([#674][gh-674])
- Fix parse error o... | [
"CHANGELOG.md",
"src/imp/parser.rs",
"tests/golden_tests/run_file/filter_bool_id.bend",
"tests/snapshots/run_file__filter_bool_id.bend.snap"
] | [] | diff --git a/tests/golden_tests/run_file/filter_bool_id.bend b/tests/golden_tests/run_file/filter_bool_id.bend
new file mode 100644
index 000000000..f8d49cd40
--- /dev/null
+++ b/tests/golden_tests/run_file/filter_bool_id.bend
@@ -0,0 +1,17 @@
+type Bool:
+ T
+ F
+
+def filter(f, ls):
+ match ls:
+ case List/Nil:... | true | |
HigherOrderCO/Bend | 700 | issue_to_patch | IO/FS/read_line never ends when reading last line with bend run-c
### Reproducing the behavior
It seems that the function have a problem reading the value from the last line, maybe because it cant find the "\n" it searches for.
Example of source file used, (there are 3 lines, the last line is not empty):
```
4... | Fix IO/FS/read_line when the line ends with a EOF | 2446f3c23b6473c687356bbd7624dbe695db8fcd | 17e3cfe4e85f9011333954a922dfb1cc89135213 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index d6e042bdd..fc748f27e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,7 @@ and this project does not currently adhere to a particular versioning scheme.
- Fix readback when hvm net has `a{n}` or `x{n}` vars. ([#659][gh-659])
- Fix imported constructors not being... | [
"CHANGELOG.md",
"src/fun/builtins.bend",
"tests/golden_tests/io/eof.txt",
"tests/golden_tests/io/read_line_eof.bend",
"tests/snapshots/io__read_line_eof.bend.snap"
] | [
{
"comment": "Can you add a comment explaining the meaning of each branch? It's getting hard to read\r\n(ok means found new line, backtrack and join chunks, err means no new line, length == 0 means file over, so return as if new line, else means the line is still ongoing",
"path": "src/fun/builtins.bend",
... | diff --git a/tests/golden_tests/io/eof.txt b/tests/golden_tests/io/eof.txt
new file mode 100644
index 000000000..f3a34851d
--- /dev/null
+++ b/tests/golden_tests/io/eof.txt
@@ -0,0 +1,1 @@
+text
\ No newline at end of file
diff --git a/tests/golden_tests/io/read_line_eof.bend b/tests/golden_tests/io/read_line_eof.bend
... | true | |
HigherOrderCO/Bend | 700 | comment_to_fix | Fix IO/FS/read_line when the line ends with a EOF | Can you add a comment explaining the meaning of each branch? It's getting hard to read
(ok means found new line, backtrack and join chunks, err means no new line, length == 0 means file over, so return as if new line, else means the line is still ongoing | 2446f3c23b6473c687356bbd7624dbe695db8fcd | 17e3cfe4e85f9011333954a922dfb1cc89135213 | diff --git a/src/fun/builtins.bend b/src/fun/builtins.bend
index c6e830b8d..cca33de52 100644
--- a/src/fun/builtins.bend
+++ b/src/fun/builtins.bend
@@ -307,6 +307,7 @@ def IO/FS/read_line.read_chunks(fd, chunks):
# Read line in 1kB chunks
chunk <- IO/done_on_err(IO/FS/read(fd, 1024))
match res = List/sp... | [
"src/fun/builtins.bend"
] | [
{
"comment": "Can you add a comment explaining the meaning of each branch? It's getting hard to read\r\n(ok means found new line, backtrack and join chunks, err means no new line, length == 0 means file over, so return as if new line, else means the line is still ongoing",
"path": "src/fun/builtins.bend",
... | true | ||
HigherOrderCO/Bend | 700 | comment_to_fix | Fix IO/FS/read_line when the line ends with a EOF | ```suggestion
# If length is 0, the end of the file was reached, return as if it was a newline
``` | 2446f3c23b6473c687356bbd7624dbe695db8fcd | 17e3cfe4e85f9011333954a922dfb1cc89135213 | diff --git a/src/fun/builtins.bend b/src/fun/builtins.bend
index c6e830b8d..cca33de52 100644
--- a/src/fun/builtins.bend
+++ b/src/fun/builtins.bend
@@ -307,6 +307,7 @@ def IO/FS/read_line.read_chunks(fd, chunks):
# Read line in 1kB chunks
chunk <- IO/done_on_err(IO/FS/read(fd, 1024))
match res = List/sp... | [
"src/fun/builtins.bend"
] | [
{
"comment": "```suggestion\r\n # If length is 0, the end of the file was reached, return as if it was a newline\r\n```",
"path": "src/fun/builtins.bend",
"hunk": "@@ -307,17 +307,26 @@ def IO/FS/read_line.read_chunks(fd, chunks):\n # Read line in 1kB chunks\n chunk <- IO/done_on_err(IO/F... | true | ||
HigherOrderCO/Bend | 700 | comment_to_fix | Fix IO/FS/read_line when the line ends with a EOF | ```suggestion
# Found a newline, backtrack and join chunks
``` | 2446f3c23b6473c687356bbd7624dbe695db8fcd | 17e3cfe4e85f9011333954a922dfb1cc89135213 | diff --git a/src/fun/builtins.bend b/src/fun/builtins.bend
index c6e830b8d..cca33de52 100644
--- a/src/fun/builtins.bend
+++ b/src/fun/builtins.bend
@@ -307,6 +307,7 @@ def IO/FS/read_line.read_chunks(fd, chunks):
# Read line in 1kB chunks
chunk <- IO/done_on_err(IO/FS/read(fd, 1024))
match res = List/sp... | [
"src/fun/builtins.bend"
] | [
{
"comment": "```suggestion\r\n # Found a newline, backtrack and join chunks\r\n```",
"path": "src/fun/builtins.bend",
"hunk": "@@ -307,17 +307,26 @@ def IO/FS/read_line.read_chunks(fd, chunks):\n # Read line in 1kB chunks\n chunk <- IO/done_on_err(IO/FS/read(fd, 1024))\n match res = Li... | true | ||
HigherOrderCO/Bend | 699 | issue_to_patch | Fix a markdown in native numbers doc file |
 | 8246a50cdb0fed36e47e566460acab92597960f1 | d3792d1fec27f7394a8d5d5c7067beb0dd765d05 | diff --git a/docs/native-numbers.md b/docs/native-numbers.md
index cd88e3a2..8bdc95e2 100644
--- a/docs/native-numbers.md
+++ b/docs/native-numbers.md
@@ -27,12 +27,12 @@ Positive numbers _must_ be written with a `+` sign, otherwise they'll be interpr
Numbers can also be written in binary or hexadecimal form. Unders... | [
"docs/native-numbers.md"
] | [] | true | ||
HigherOrderCO/Bend | 693 | issue_to_patch | Outdated `run` commands in GUIDE.md
### Reproducing the behavior
In https://github.com/HigherOrderCO/Bend/pull/630 we changed the default runtime to be the HVM C. The readme was updated, but `GUIDE.md` was not, and it still has the wrong commands.
Where it mentions the rust runtime, the command should be `bend run... | Update guide and add comment in syntax doc | Closes #691 and #692 | bd592ca33f5e9b8b7a467b3da63501b697536966 | 632f79d46fd9880986498df4211aab5921838181 | diff --git a/GUIDE.md b/GUIDE.md
index 4f967c051..ea89b25c2 100644
--- a/GUIDE.md
+++ b/GUIDE.md
@@ -1,5 +1,4 @@
-Bend in X minutes - the ultimate guide!
-=======================================
+# Bend in X minutes - the ultimate guide!
Bend is a high-level, massively parallel programming language. That means it
f... | [
"GUIDE.md",
"docs/syntax.md"
] | [] | true | |
HigherOrderCO/Bend | 673 | issue_to_patch | Changes towards a language server friendly compiler | This PR:
- Changes all parsing to return `TSPL::ParseError`, new in the latest TSPL version, as to report error range information,
- Adds optional `FileSpan` to each `Diagnostic`,
- Adds the `Function` diagnostic origin,
- Plenty of smaller changes to make the previous points work.
I'm still not sure about the `... | 425cdaa173b41b3b8c8c01041e1f687e5d42c8d3 | cd268fafee6066a6e5564d6ab571b8dc572270ed | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 55d820753..d6e042bdd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -33,6 +33,7 @@ and this project does not currently adhere to a particular versioning scheme.
- Change branches to support ending with ask statements. ([#629][gh-629])
- Improve hexadecimal and binary fl... | [
"CHANGELOG.md",
"Cargo.lock",
"Cargo.toml",
"src/diagnostics.rs",
"src/fun/check/unbound_refs.rs",
"src/fun/check/unbound_vars.rs",
"src/fun/load_book.rs",
"src/fun/mod.rs",
"src/fun/net_to_term.rs",
"src/fun/parser.rs",
"src/fun/transform/apply_args.rs",
"src/fun/transform/definition_merge.rs... | [
{
"comment": "`Function` and `Rule` diagnostics are the same, you could have just a single one called `Function`.\r\n\r\nI don't think its very meaningful which syntax it comes from.",
"path": "src/diagnostics.rs",
"hunk": "@@ -28,16 +31,21 @@ pub struct DiagnosticsConfig {\n \n #[derive(Debug, Clone)]\... | diff --git a/tests/golden_tests.rs b/tests/golden_tests.rs
index 8374e64fe..618e55270 100644
--- a/tests/golden_tests.rs
+++ b/tests/golden_tests.rs
@@ -480,7 +480,7 @@ fn examples() -> Result<(), Diagnostics> {
run_book(book, RunOpts::default(), compile_opts, diagnostics_cfg, None, "run-c")?.unwrap();
... | true | |
HigherOrderCO/Bend | 673 | comment_to_fix | Changes towards a language server friendly compiler | `Function` and `Rule` diagnostics are the same, you could have just a single one called `Function`.
I don't think its very meaningful which syntax it comes from. | 425cdaa173b41b3b8c8c01041e1f687e5d42c8d3 | cd268fafee6066a6e5564d6ab571b8dc572270ed | diff --git a/src/diagnostics.rs b/src/diagnostics.rs
index 2b436e9c3..c8264ae37 100644
--- a/src/diagnostics.rs
+++ b/src/diagnostics.rs
@@ -1,7 +1,10 @@
-use crate::fun::{display::DisplayFn, Name};
+use TSPL::ParseError;
+
+use crate::fun::{display::DisplayFn, Name, Source};
use std::{
collections::BTreeMap,
fm... | [
"src/diagnostics.rs"
] | [
{
"comment": "`Function` and `Rule` diagnostics are the same, you could have just a single one called `Function`.\r\n\r\nI don't think its very meaningful which syntax it comes from.",
"path": "src/diagnostics.rs",
"hunk": "@@ -28,16 +31,21 @@ pub struct DiagnosticsConfig {\n \n #[derive(Debug, Clone)]\... | true | ||
HigherOrderCO/Bend | 673 | comment_to_fix | Changes towards a language server friendly compiler | What is the point of returning a new diagnotics context if we only ever return a single string? | 425cdaa173b41b3b8c8c01041e1f687e5d42c8d3 | cd268fafee6066a6e5564d6ab571b8dc572270ed | diff --git a/src/imp/to_fun.rs b/src/imp/to_fun.rs
index 1c419c1ec..114427e79 100644
--- a/src/imp/to_fun.rs
+++ b/src/imp/to_fun.rs
@@ -1,13 +1,17 @@
use super::{AssignPattern, Definition, Expr, InPlaceOp, Stmt};
-use crate::fun::{
- self,
- builtins::{LCONS, LNIL},
- parser::ParseBook,
- Book, Name,
+use crate::... | [
"src/imp/to_fun.rs"
] | [
{
"comment": "What is the point of returning a new diagnotics context if we only ever return a single string?",
"path": "src/imp/to_fun.rs",
"hunk": "@@ -83,7 +99,7 @@ fn wrap(nxt: Option<fun::Pattern>, term: fun::Term, ask: bool) -> StmtToFun {\n }\n \n impl Stmt {\n- fn into_fun(self) -> Result<StmtT... | true | ||
HigherOrderCO/Bend | 673 | comment_to_fix | Changes towards a language server friendly compiler | It'd be better to not have the "expected" "detected" part here, since it is a field, just not a good one.
Either that or change the message to `unique field` or similar. | 425cdaa173b41b3b8c8c01041e1f687e5d42c8d3 | cd268fafee6066a6e5564d6ab571b8dc572270ed | diff --git a/tests/snapshots/parse_file__repeated_datatype_name.bend.snap b/tests/snapshots/parse_file__repeated_datatype_name.bend.snap
index ea0a83853..8e23b5667 100644
--- a/tests/snapshots/parse_file__repeated_datatype_name.bend.snap
+++ b/tests/snapshots/parse_file__repeated_datatype_name.bend.snap
@@ -3,5 +3,8 @@... | [
"tests/snapshots/parse_file__repeated_datatype_name.bend.snap"
] | [
{
"comment": "It'd be better to not have the \"expected\" \"detected\" part here, since it is a field, just not a good one.\r\n\r\nEither that or change the message to `unique field` or similar.",
"path": "tests/snapshots/parse_file__repeated_datatype_name.bend.snap",
"hunk": "@@ -4,4 +4,8 @@ input_file... | true | ||
HigherOrderCO/Bend | 673 | comment_to_fix | Changes towards a language server friendly compiler | ```suggestion
hvm = "=2.0.22"
```
Since HVM doesn't follow semnatic versioning | 425cdaa173b41b3b8c8c01041e1f687e5d42c8d3 | cd268fafee6066a6e5564d6ab571b8dc572270ed | diff --git a/Cargo.toml b/Cargo.toml
index ddcbb601f..aa4bdce81 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -24,10 +24,10 @@ default = ["cli"]
cli = ["dep:clap"]
[dependencies]
-TSPL = "0.0.12"
+TSPL = "0.0.13"
clap = { version = "4.4.1", features = ["derive"], optional = true }
highlight_error = "0.1.1"
-hvm = "... | [
"Cargo.toml"
] | [
{
"comment": "```suggestion\r\nhvm = \"=2.0.22\"\r\n```\r\nSince HVM doesn't follow semnatic versioning",
"path": "Cargo.toml",
"hunk": "@@ -24,10 +24,10 @@ default = [\"cli\"]\n cli = [\"dep:clap\"]\n \n [dependencies]\n-TSPL = \"0.0.12\"\n+TSPL = \"0.0.13\"\n clap = { version = \"4.4.1\", features = [... | true | ||
HigherOrderCO/Bend | 673 | comment_to_fix | Changes towards a language server friendly compiler | I wonder if we could and should unify all these source points and spans into a single thing. It's a bit overcomplicated atm. | 425cdaa173b41b3b8c8c01041e1f687e5d42c8d3 | cd268fafee6066a6e5564d6ab571b8dc572270ed | diff --git a/src/fun/mod.rs b/src/fun/mod.rs
index 5d7c687e6..b88b5c246 100644
--- a/src/fun/mod.rs
+++ b/src/fun/mod.rs
@@ -1,16 +1,12 @@
use crate::{
- diagnostics::{Diagnostics, DiagnosticsConfig},
+ diagnostics::{Diagnostics, DiagnosticsConfig, TextSpan},
imports::Import,
maybe_grow, multi_iterator, ENTRY_... | [
"src/fun/mod.rs"
] | [
{
"comment": "I wonder if we could and should unify all these source points and spans into a single thing. It's a bit overcomplicated atm.",
"path": "src/fun/mod.rs",
"hunk": "@@ -78,7 +74,7 @@ pub enum Source {\n /// Was generated by the compiler.\n Generated,\n /// Source code location from the ... | true | ||
HigherOrderCO/Bend | 673 | comment_to_fix | Changes towards a language server friendly compiler | I'm not exactly sure how this function is used, but generated functions should inherit the source of their generator.
So for example if we have
```
# File Nat/to_u24.bend
from Nat import {Succ, Zero}
def to_u24(x):
match x:
case Succ:
return 1 + to_u24(x.pred)
case Zero:
return 0
``... | 425cdaa173b41b3b8c8c01041e1f687e5d42c8d3 | cd268fafee6066a6e5564d6ab571b8dc572270ed | diff --git a/src/fun/mod.rs b/src/fun/mod.rs
index 5d7c687e6..b88b5c246 100644
--- a/src/fun/mod.rs
+++ b/src/fun/mod.rs
@@ -1,16 +1,12 @@
use crate::{
- diagnostics::{Diagnostics, DiagnosticsConfig},
+ diagnostics::{Diagnostics, DiagnosticsConfig, TextSpan},
imports::Import,
maybe_grow, multi_iterator, ENTRY_... | [
"src/fun/mod.rs"
] | [
{
"comment": "I'm not exactly sure how this function is used, but generated functions should inherit the source of their generator.\r\n\r\nSo for example if we have\r\n```\r\n# File Nat/to_u24.bend\r\nfrom Nat import {Succ, Zero}\r\n\r\ndef to_u24(x):\r\n match x:\r\n case Succ:\r\n return 1 + to_u24(x... | true | ||
HigherOrderCO/Bend | 673 | comment_to_fix | Changes towards a language server friendly compiler | This one osnt an override | 425cdaa173b41b3b8c8c01041e1f687e5d42c8d3 | cd268fafee6066a6e5564d6ab571b8dc572270ed | diff --git a/src/fun/parser.rs b/src/fun/parser.rs
index 97c9e8267..fadea7430 100644
--- a/src/fun/parser.rs
+++ b/src/fun/parser.rs
@@ -1,6 +1,7 @@
use std::ops::Range;
use crate::{
+ diagnostics::{TextLocation, TextSpan},
fun::{
display::DisplayFn, Adt, Adts, Constructors, CtrField, FanKind, HvmDefinitio... | [
"src/fun/parser.rs"
] | [
{
"comment": "This one osnt an override",
"path": "src/fun/parser.rs",
"hunk": "@@ -1093,6 +1127,15 @@ impl<'a> Parser<'a> for TermParser<'a> {\n self.expected_spanned(exp, ini_idx..end_idx)\n }\n \n+ /// Generates an error message with an additional custom message.\n+ ///\n+ /// Override to ha... | true | ||
HigherOrderCO/Bend | 676 | issue_to_patch | Error on eraser program
### Reproducing the behavior
With code:
```
(Main) = (*)
```
Expected:
With `bend run` to parse and return `*`
Error:
```
- expected: term
- detected:
3 | (Main) = (*)
```
### System Settings
Bend: 0.2.36
### Additional context
_No response_ | Allow era term to be surrounded by parens | d6a1995fb5b3da0981f69bae31cba675b77e4079 | 1daf6c5f5889bad8ff3d07f56f4c072f93352780 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6799e5317..55d820753 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,8 @@ and this project does not currently adhere to a particular versioning scheme.
- Expand references to functions generated by the `float_combinators` pass inside the main function. ([#642][g... | [
"CHANGELOG.md",
"src/fun/parser.rs",
"src/imports/book.rs",
"tests/golden_tests/import_system/import_ctr_syntax.bend",
"tests/golden_tests/import_system/lib/ctr_type.bend",
"tests/golden_tests/parse_file/era.bend",
"tests/snapshots/import_system__import_ctr_syntax.bend.snap",
"tests/snapshots/parse_fi... | [
{
"comment": "This will accept other opers as erasure as well, no? Like `(+)`",
"path": "src/fun/parser.rs",
"hunk": "@@ -482,6 +482,10 @@ impl<'a> TermParser<'a> {\n return Ok(Term::Fan { fan: FanKind::Tup, tag: tag.unwrap_or(Tag::Static), els });\n }\n \n+ if self.try_co... | diff --git a/tests/golden_tests/import_system/import_ctr_syntax.bend b/tests/golden_tests/import_system/import_ctr_syntax.bend
new file mode 100644
index 000000000..c1303a051
--- /dev/null
+++ b/tests/golden_tests/import_system/import_ctr_syntax.bend
@@ -0,0 +1,3 @@
+from lib/ctr_type import Ctr
+
+main = (Ctr/Foo 2 3)... | true | |
HigherOrderCO/Bend | 676 | comment_to_fix | Allow era term to be surrounded by parens | This will accept other opers as erasure as well, no? Like `(+)` | d6a1995fb5b3da0981f69bae31cba675b77e4079 | 1daf6c5f5889bad8ff3d07f56f4c072f93352780 | diff --git a/src/fun/parser.rs b/src/fun/parser.rs
index 3046070f3..97c9e8267 100644
--- a/src/fun/parser.rs
+++ b/src/fun/parser.rs
@@ -482,6 +482,10 @@ impl<'a> TermParser<'a> {
return Ok(Term::Fan { fan: FanKind::Tup, tag: tag.unwrap_or(Tag::Static), els });
}
+ if opr == Op::MUL &... | [
"src/fun/parser.rs"
] | [
{
"comment": "This will accept other opers as erasure as well, no? Like `(+)`",
"path": "src/fun/parser.rs",
"hunk": "@@ -482,6 +482,10 @@ impl<'a> TermParser<'a> {\n return Ok(Term::Fan { fan: FanKind::Tup, tag: tag.unwrap_or(Tag::Static), els });\n }\n \n+ if self.try_co... | true | ||
HigherOrderCO/Bend | 676 | comment_to_fix | Allow era term to be surrounded by parens | This is for https://github.com/HigherOrderCO/Bend/issues/674 right?
Can you add a test? | d6a1995fb5b3da0981f69bae31cba675b77e4079 | 1daf6c5f5889bad8ff3d07f56f4c072f93352780 | diff --git a/src/imports/book.rs b/src/imports/book.rs
index 10ad64c8e..3c2c7b7b8 100644
--- a/src/imports/book.rs
+++ b/src/imports/book.rs
@@ -161,6 +161,7 @@ impl ParseBook {
let adts = std::mem::take(&mut self.adts);
let mut new_adts = IndexMap::new();
let mut ctrs_map = IndexMap::new();
+ let mut... | [
"src/imports/book.rs"
] | [
{
"comment": "This is for https://github.com/HigherOrderCO/Bend/issues/674 right?\r\n\r\nCan you add a test?",
"path": "src/imports/book.rs",
"hunk": "@@ -161,6 +161,7 @@ impl ParseBook {\n let adts = std::mem::take(&mut self.adts);\n let mut new_adts = IndexMap::new();\n let mut ctrs_map = ... | true | ||
HigherOrderCO/Bend | 676 | comment_to_fix | Allow era term to be surrounded by parens | ```suggestion
# Test issue #674
type Ctr:
``` | d6a1995fb5b3da0981f69bae31cba675b77e4079 | 1daf6c5f5889bad8ff3d07f56f4c072f93352780 | diff --git a/tests/golden_tests/import_system/lib/ctr_type.bend b/tests/golden_tests/import_system/lib/ctr_type.bend
new file mode 100644
index 000000000..649bad49a
--- /dev/null
+++ b/tests/golden_tests/import_system/lib/ctr_type.bend
@@ -0,0 +1,6 @@
+# Test issue #674
+type Ctr:
+ Foo { x, y }
+
+def Ctr/wrap(x):
+ ... | [
"tests/golden_tests/import_system/lib/ctr_type.bend"
] | [
{
"comment": "```suggestion\r\n# Test issue #674\r\ntype Ctr:\r\n```",
"path": "tests/golden_tests/import_system/lib/ctr_type.bend",
"hunk": "@@ -0,0 +1,5 @@\n+type Ctr:",
"resolving_sha": "1daf6c5f5889bad8ff3d07f56f4c072f93352780",
"resolving_diff": "diff --git a/tests/golden_tests/import_syste... | true | ||
HigherOrderCO/Bend | 671 | issue_to_patch | Whenever a test in /examples doesn't compile, the test fails instead of updating the snapshot
### Reproducing the behavior
Example:
When running tests on the examples folder, if one doesn't compile, I get a "PoisonError", and following unrelated tests will also fail:
thread 'examples' panicked at tests/golden_tes... | #666 Whenever a test in /examples doesn't compile, the test fails instead of updating the snapshot | 94d43978bc0ee91e7639bf47998f70ec5c866d7e | aacad7a6a601db6520c789943646dc4fb7b3c78b | [
"tests/golden_tests.rs"
] | [] | diff --git a/tests/golden_tests.rs b/tests/golden_tests.rs
index d4f7c8314..8374e64fe 100644
--- a/tests/golden_tests.rs
+++ b/tests/golden_tests.rs
@@ -467,17 +467,21 @@ fn examples() -> Result<(), Diagnostics> {
.filter_map(|e| e.ok())
.filter(|e| e.path().extension().map_or(false, |ext| ext == "bend"))
... | true | ||
HigherOrderCO/Bend | 672 | issue_to_patch | Update README.md | Corrected the HVM2 paper's link | 94d43978bc0ee91e7639bf47998f70ec5c866d7e | 60efe8df3b73d11a66548a35737d3ca50e064bae | diff --git a/README.md b/README.md
index 836ccfb71..64a2cdbba 100644
--- a/README.md
+++ b/README.md
@@ -279,7 +279,7 @@ if you are interested in some other algorithms, you can check our [examples fold
### Additional Resources
- - To understand the technology behind Bend, check out the HVM2 [paper](https://docs.go... | [
"README.md"
] | [
{
"comment": "```suggestion\r\n - To understand the technology behind Bend, check out the HVM2 [paper](https://paper.higherorderco.com/).\r\n```\r\nThis is the more permanent link I guess",
"path": "README.md",
"hunk": "@@ -279,7 +279,7 @@ if you are interested in some other algorithms, you can check ou... | true | ||
HigherOrderCO/Bend | 672 | comment_to_fix | Update README.md | ```suggestion
- To understand the technology behind Bend, check out the HVM2 [paper](https://paper.higherorderco.com/).
```
This is the more permanent link I guess | 94d43978bc0ee91e7639bf47998f70ec5c866d7e | 60efe8df3b73d11a66548a35737d3ca50e064bae | diff --git a/README.md b/README.md
index 836ccfb71..64a2cdbba 100644
--- a/README.md
+++ b/README.md
@@ -279,7 +279,7 @@ if you are interested in some other algorithms, you can check our [examples fold
### Additional Resources
- - To understand the technology behind Bend, check out the HVM2 [paper](https://docs.go... | [
"README.md"
] | [
{
"comment": "```suggestion\r\n - To understand the technology behind Bend, check out the HVM2 [paper](https://paper.higherorderco.com/).\r\n```\r\nThis is the more permanent link I guess",
"path": "README.md",
"hunk": "@@ -279,7 +279,7 @@ if you are interested in some other algorithms, you can check ou... | true | ||
HigherOrderCO/Bend | 670 | issue_to_patch | Missing information on Contributing.md
### Reproducing the behavior
On the Submitting Changes section of CONTRIBUTING.md, section 4. cargo insta test doesn't work, and no instructions on how to install insta were found.
`~/Bend$ cargo insta test
error: no such command: 'insta'`
### System Settings
.
### Additio... | #663 Missing information on CONTRIBUTING.md | d2cc03eae1c0adb12a7430b36f36c7d31af27be7 | 6836c120ff2892aadc2ac1658bf3b7de50e78616 | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7380659f6..43131b5da 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,19 +1,25 @@
-# Contributing to Bend
+# Contributing to Bend
+
Thank you for considering contributing to Bend!
## How to Contribute
+
### Reporting bugs
+
1. **Check for existing issu... | [
"CONTRIBUTING.md"
] | [] | true | ||
HigherOrderCO/Bend | 668 | issue_to_patch | Reenable IO tests
We disabled IO tests while HVM didn't support it, but now it does.
We should reenable them. | #462 Reenable io tests | 23e086c5dab9110410a87f5f1f4aba0cf5c09ec3 | 5a5c52c212edfa4986d16edb5fb04ea37ee0d07a | diff --git a/src/fun/builtins.bend b/src/fun/builtins.bend
index b259e561e..c6e830b8d 100644
--- a/src/fun/builtins.bend
+++ b/src/fun/builtins.bend
@@ -323,10 +323,14 @@ def IO/FS/read_line.read_chunks(fd, chunks):
# Writes a list of bytes to a file given by a path.
def IO/FS/write_file(path, bytes):
with IO:
- ... | [
"src/fun/builtins.bend",
"tests/golden_tests.rs",
"tests/snapshots/io__load.bend.snap",
"tests/snapshots/io__load_fail.bend.snap",
"tests/snapshots/io__store.bend.snap",
"tests/snapshots/io__store_fail.bend.snap"
] | [] | diff --git a/tests/golden_tests.rs b/tests/golden_tests.rs
index a377c24ff..d4f7c8314 100644
--- a/tests/golden_tests.rs
+++ b/tests/golden_tests.rs
@@ -427,7 +427,6 @@ fn mutual_recursion() {
}
#[test]
-#[ignore = "while IO is not implemented for hvm32"]
fn io() {
run_golden_test_dir_multiple(
function_na... | true | |
HigherOrderCO/Bend | 669 | issue_to_patch | Fix grammar in dups-and-sups.md | I know this is kind of low-hanging fruit with no real impact, but was very annoying, hence the PR. | 23e086c5dab9110410a87f5f1f4aba0cf5c09ec3 | 66e5da7d59a2a454df35cf991febf3fe56f937ec | diff --git a/docs/dups-and-sups.md b/docs/dups-and-sups.md
index 06a2c5728..9d3819d48 100644
--- a/docs/dups-and-sups.md
+++ b/docs/dups-and-sups.md
@@ -31,7 +31,7 @@ let {x1 x2} = {1 2}
```
Due to how duplications are compiled, when two dups interact, they destructively interfere with each other.
-In this case the... | [
"docs/dups-and-sups.md"
] | [] | true | ||
HigherOrderCO/Bend | 649 | issue_to_patch | Enable net size check when running with `run-cu`
**Is your feature request related to a problem? Please describe.**
We disabled the `check_net_size` compilation pass so that it wouldn't trigger when running things with the C runtime. But now, if a net ends up being too large for hvm-cu, it'll fail at runtime.
**De... | enable net_size_check by default with different max sizes for c and cuda | Fixes #622 | dc14ed2e30cddeef83930a1ac062ab376fa1fc51 | 305c9446192f30f615645d7e5e1a501ed1af1b19 | diff --git a/examples/hello_world.bend b/examples/hello_world.bend
index a1e3ce631..81ad13e50 100644
--- a/examples/hello_world.bend
+++ b/examples/hello_world.bend
@@ -1,4 +1,4 @@
def main():
with IO:
- * <- IO/print("Hello, world!")
+ * <- IO/print("Hello, world!\n")
return wrap(0)
\ No newline at end ... | [
"examples/hello_world.bend",
"src/hvm/check_net_size.rs",
"src/lib.rs",
"src/main.rs",
"tests/snapshots/cli__net_size_too_large.bend.snap",
"tests/snapshots/compile_long__huge_tree.bend.snap",
"tests/snapshots/compile_long__long_str_file.bend.snap"
] | [
{
"comment": "The CLI should be decoupled from Bend as a library, so we don't want to pass the command as a string.\r\nInstead this value should be part of the compiler options struct, and set by the CLI in `compile_opts_from_cli`",
"path": "src/hvm/check_net_size.rs",
"hunk": "@@ -2,16 +2,22 @@ use sup... | diff --git a/tests/snapshots/cli__net_size_too_large.bend.snap b/tests/snapshots/cli__net_size_too_large.bend.snap
index 0d3f91caf..60d1eeacc 100644
--- a/tests/snapshots/cli__net_size_too_large.bend.snap
+++ b/tests/snapshots/cli__net_size_too_large.bend.snap
@@ -2,6 +2,170 @@
source: tests/golden_tests.rs
input_fil... | true |
HigherOrderCO/Bend | 649 | comment_to_fix | enable net_size_check by default with different max sizes for c and cuda | The CLI should be decoupled from Bend as a library, so we don't want to pass the command as a string.
Instead this value should be part of the compiler options struct, and set by the CLI in `compile_opts_from_cli` | dc14ed2e30cddeef83930a1ac062ab376fa1fc51 | 305c9446192f30f615645d7e5e1a501ed1af1b19 | diff --git a/src/hvm/check_net_size.rs b/src/hvm/check_net_size.rs
index ff733be60..f524ff121 100644
--- a/src/hvm/check_net_size.rs
+++ b/src/hvm/check_net_size.rs
@@ -1,17 +1,27 @@
use super::tree_children;
-use crate::{diagnostics::Diagnostics, fun::Name};
+use crate::{diagnostics::Diagnostics, fun::Name, CompilerT... | [
"src/hvm/check_net_size.rs"
] | [
{
"comment": "The CLI should be decoupled from Bend as a library, so we don't want to pass the command as a string.\r\nInstead this value should be part of the compiler options struct, and set by the CLI in `compile_opts_from_cli`",
"path": "src/hvm/check_net_size.rs",
"hunk": "@@ -2,16 +2,22 @@ use sup... | true | ||
HigherOrderCO/Bend | 649 | comment_to_fix | enable net_size_check by default with different max sizes for c and cuda | This function shouldn't receive all the options, only the one it uses. | dc14ed2e30cddeef83930a1ac062ab376fa1fc51 | 305c9446192f30f615645d7e5e1a501ed1af1b19 | diff --git a/src/hvm/check_net_size.rs b/src/hvm/check_net_size.rs
index ff733be60..f524ff121 100644
--- a/src/hvm/check_net_size.rs
+++ b/src/hvm/check_net_size.rs
@@ -1,17 +1,27 @@
use super::tree_children;
-use crate::{diagnostics::Diagnostics, fun::Name};
+use crate::{diagnostics::Diagnostics, fun::Name, CompilerT... | [
"src/hvm/check_net_size.rs"
] | [
{
"comment": "This function shouldn't receive all the options, only the one it uses.",
"path": "src/hvm/check_net_size.rs",
"hunk": "@@ -1,17 +1,27 @@\n use super::tree_children;\n-use crate::{diagnostics::Diagnostics, fun::Name};\n+use crate::{diagnostics::Diagnostics, fun::Name, CompileOpts};\n use hv... | true | ||
HigherOrderCO/Bend | 649 | comment_to_fix | enable net_size_check by default with different max sizes for c and cuda | Instead of storing the command, which is a CLI thing, we should store the target architecture.
For now we can use a structured format, like an enum
```
enum CompileTarget {
C,
Cuda,
Unknown,
}
``` | dc14ed2e30cddeef83930a1ac062ab376fa1fc51 | 305c9446192f30f615645d7e5e1a501ed1af1b19 | diff --git a/src/lib.rs b/src/lib.rs
index 2af6bf988..209d32bf2 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -2,7 +2,7 @@ use crate::{
fun::{book_to_hvm, net_to_term::net_to_term, term_to_net::Labels, Book, Ctx, Term},
hvm::{
add_recursive_priority::add_recursive_priority,
- check_net_size::{check_net_size... | [
"src/lib.rs"
] | [
{
"comment": "Instead of storing the command, which is a CLI thing, we should store the target architecture.\r\nFor now we can use a structured format, like an enum\r\n```\r\nenum CompileTarget {\r\n C,\r\n Cuda,\r\n Unknown,\r\n}\r\n```",
"path": "src/lib.rs",
"hunk": "@@ -331,6 +331,9 @@ impl OptLe... | true | ||
HigherOrderCO/Bend | 649 | comment_to_fix | enable net_size_check by default with different max sizes for c and cuda | If you change the command to be a target instead, it would be nice to print it here. Something like `Definition is too large for HVM target {} ...` | dc14ed2e30cddeef83930a1ac062ab376fa1fc51 | 305c9446192f30f615645d7e5e1a501ed1af1b19 | diff --git a/src/hvm/check_net_size.rs b/src/hvm/check_net_size.rs
index ff733be60..f524ff121 100644
--- a/src/hvm/check_net_size.rs
+++ b/src/hvm/check_net_size.rs
@@ -1,17 +1,27 @@
use super::tree_children;
-use crate::{diagnostics::Diagnostics, fun::Name};
+use crate::{diagnostics::Diagnostics, fun::Name, CompilerT... | [
"src/hvm/check_net_size.rs"
] | [
{
"comment": "If you change the command to be a target instead, it would be nice to print it here. Something like `Definition is too large for HVM target {} ...`",
"path": "src/hvm/check_net_size.rs",
"hunk": "@@ -1,17 +1,27 @@\n use super::tree_children;\n-use crate::{diagnostics::Diagnostics, fun::Nam... | true | ||
HigherOrderCO/Bend | 649 | comment_to_fix | enable net_size_check by default with different max sizes for c and cuda | ```suggestion
target_architecture: CompilerTarget::Unknown,
``` | dc14ed2e30cddeef83930a1ac062ab376fa1fc51 | 305c9446192f30f615645d7e5e1a501ed1af1b19 | diff --git a/src/lib.rs b/src/lib.rs
index 2af6bf988..209d32bf2 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -2,7 +2,7 @@ use crate::{
fun::{book_to_hvm, net_to_term::net_to_term, term_to_net::Labels, Book, Ctx, Term},
hvm::{
add_recursive_priority::add_recursive_priority,
- check_net_size::{check_net_size... | [
"src/lib.rs"
] | [
{
"comment": "```suggestion\r\n target_architecture: CompilerTarget::Unknown,\r\n```",
"path": "src/lib.rs",
"hunk": "@@ -406,13 +418,14 @@ impl Default for CompileOpts {\n /// Uses num-scott ADT encoding.\n fn default() -> Self {\n Self {\n+ target_architecture: CompilerTarget::Cuda,"... | true | ||
HigherOrderCO/Bend | 649 | comment_to_fix | enable net_size_check by default with different max sizes for c and cuda | This is weird, it should be breaking this thing in pieces of the size we passed to the `float_combinators` pass (64, MAX_NET_SIZE_CUDA) | dc14ed2e30cddeef83930a1ac062ab376fa1fc51 | 305c9446192f30f615645d7e5e1a501ed1af1b19 | diff --git a/tests/snapshots/compile_long__huge_tree.bend.snap b/tests/snapshots/compile_long__huge_tree.bend.snap
index d5a8a014d..ee6c230f5 100644
--- a/tests/snapshots/compile_long__huge_tree.bend.snap
+++ b/tests/snapshots/compile_long__huge_tree.bend.snap
@@ -2,4 +2,6 @@
source: tests/golden_tests.rs
input_file:... | [
"tests/snapshots/compile_long__huge_tree.bend.snap"
] | [
{
"comment": "This is weird, it should be breaking this thing in pieces of the size we passed to the `float_combinators` pass (64, MAX_NET_SIZE_CUDA)",
"path": "tests/snapshots/compile_long__huge_tree.bend.snap",
"hunk": "@@ -2,4 +2,6 @@\n source: tests/golden_tests.rs\n input_file: tests/golden_tests/c... | true | ||
HigherOrderCO/Bend | 667 | issue_to_patch | Add List equals and tail to the list.bend example | Adds funcions equals and tail. The first compares two Lists and returns 1 if they're equal, and 0 otherwise. The second returns the tail of a given list. | dc14ed2e30cddeef83930a1ac062ab376fa1fc51 | ea96b43be9f5249fa855d918107d2f5291e9fece | diff --git a/examples/list.bend b/examples/list.bend
index d9ed50cfa..c3c0c487f 100644
--- a/examples/list.bend
+++ b/examples/list.bend
@@ -106,6 +106,35 @@ head = @l
List/Nil: []
}
+# List tail:
+# List l -> List
+# returns the list except for the first item in it, or [] if the list is empty.
+def tail(l):
... | [
"examples/list.bend"
] | [] | true | ||
HigherOrderCO/Bend | 661 | issue_to_patch | Make IO functions return Result
https://github.com/HigherOrderCO/HVM/pull/407 Implements the necessary changes for us to capture both errors in the runtime (like incorrect arguments, non-existant IO called) as well as errors in the execution of the IO themselves.
The IOs now return `Result<A, IOError<B>>`
We need to... | #657 Make IO functions return Result | b4a20f148d8683f6c2b9b87aaa0c30bfe082325f | 2a1f0774d753f5df309bb4a46a4ce83269b92742 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7d57b3307..6799e5317 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,6 +30,7 @@ and this project does not currently adhere to a particular versioning scheme.
- Improve error messages in branching statements. ([#464][gh-464])
- Change branches to support ending with a... | [
"CHANGELOG.md",
"docs/builtins.md",
"src/fun/builtins.bend",
"tests/golden_tests/io/load.bend",
"tests/golden_tests/io/load_fail.bend",
"tests/golden_tests/io/store.bend",
"tests/golden_tests/io/store_fail.bend"
] | [
{
"comment": "```suggestion\r\nReturns the inner value of `Result/Ok` or `Result/Err`.\r\n\r\nIf the types `A` and `B` are different, should only be used in type unsafe programs or when only one variant is guaranteed to happen.\r\n```",
"path": "docs/builtins.md",
"hunk": "@@ -118,6 +118,22 @@ Splits a ... | diff --git a/tests/golden_tests/io/load.bend b/tests/golden_tests/io/load.bend
index 852673036..efc8e016a 100644
--- a/tests/golden_tests/io/load.bend
+++ b/tests/golden_tests/io/load.bend
@@ -1,6 +1,6 @@
(Main) =
use path = "tests/golden_tests/io/load.txt"
- (HVM.load path @result match result {
- Result/ok: r... | true | |
HigherOrderCO/Bend | 661 | comment_to_fix | #657 Make IO functions return Result | ```suggestion
Returns the inner value of `Result/Ok` or `Result/Err`.
If the types `A` and `B` are different, should only be used in type unsafe programs or when only one variant is guaranteed to happen.
``` | b4a20f148d8683f6c2b9b87aaa0c30bfe082325f | 2a1f0774d753f5df309bb4a46a4ce83269b92742 | diff --git a/docs/builtins.md b/docs/builtins.md
index b5be28ce2..fc4733411 100644
--- a/docs/builtins.md
+++ b/docs/builtins.md
@@ -118,6 +118,24 @@ Splits a list into two lists at the first occurrence of a value.
List/split_once(xs: List(T), val: T) -> (Result(List(T), List(T)))
```
+## Result
+
+```python
+type ... | [
"docs/builtins.md"
] | [
{
"comment": "```suggestion\r\nReturns the inner value of `Result/Ok` or `Result/Err`.\r\n\r\nIf the types `A` and `B` are different, should only be used in type unsafe programs or when only one variant is guaranteed to happen.\r\n```",
"path": "docs/builtins.md",
"hunk": "@@ -118,6 +118,22 @@ Splits a ... | true | ||
HigherOrderCO/Bend | 662 | issue_to_patch | Adds builtin functions Tree/reverse and Tree/to_list | b4a20f148d8683f6c2b9b87aaa0c30bfe082325f | 63ba5d22755e85f715651be18d2a8fd0f66035e2 | diff --git a/src/fun/builtins.bend b/src/fun/builtins.bend
index 89c04fd15..2a5f90cc1 100644
--- a/src/fun/builtins.bend
+++ b/src/fun/builtins.bend
@@ -76,10 +76,20 @@ String/split s delim = (String/split.go s delim (List/Cons String/Nil List/Nil))
# Create a new difference list
DiffList/new = λx x
+# DiffList/wra... | [
"src/fun/builtins.bend",
"tests/golden_tests/run_file/tree_to_list.bend",
"tests/snapshots/run_file__tree_to_list.bend.snap"
] | [
{
"comment": "```suggestion\r\n return ![tree.right, tree.left]\r\n\r\n```",
"path": "src/fun/builtins.bend",
"hunk": "@@ -96,7 +106,22 @@ type Tree:\n Node { ~left, ~right }\n Leaf { value }\n \n-\n+# Returns a List converted from a Tree.\n+def Tree/to_list(tree):\n+ fold tree:\n+ case Tre... | diff --git a/tests/golden_tests/run_file/tree_to_list.bend b/tests/golden_tests/run_file/tree_to_list.bend
new file mode 100644
index 000000000..afcd27eec
--- /dev/null
+++ b/tests/golden_tests/run_file/tree_to_list.bend
@@ -0,0 +1,4 @@
+def main:
+ var = Tree/reverse(![![!1, !2],![!3, !4]])
+ return Tree/to_list(var... | true | ||
HigherOrderCO/Bend | 662 | comment_to_fix | Adds builtin functions Tree/reverse and Tree/to_list | ```suggestion
return ![tree.right, tree.left]
``` | b4a20f148d8683f6c2b9b87aaa0c30bfe082325f | 63ba5d22755e85f715651be18d2a8fd0f66035e2 | diff --git a/src/fun/builtins.bend b/src/fun/builtins.bend
index 89c04fd15..2a5f90cc1 100644
--- a/src/fun/builtins.bend
+++ b/src/fun/builtins.bend
@@ -76,10 +76,20 @@ String/split s delim = (String/split.go s delim (List/Cons String/Nil List/Nil))
# Create a new difference list
DiffList/new = λx x
+# DiffList/wra... | [
"src/fun/builtins.bend"
] | [
{
"comment": "```suggestion\r\n return ![tree.right, tree.left]\r\n\r\n```",
"path": "src/fun/builtins.bend",
"hunk": "@@ -96,7 +106,22 @@ type Tree:\n Node { ~left, ~right }\n Leaf { value }\n \n-\n+# Returns a List converted from a Tree.\n+def Tree/to_list(tree):\n+ fold tree:\n+ case Tre... | true | ||
HigherOrderCO/Bend | 659 | issue_to_patch | Fix readback when hvm net has `a{n}` or `x{n}` vars | HVM IO operations are generating variables `x1`, etc with very low number, which caused conflict in the HVM net -> Bend inet conversion leading to incorrect readback. | 5c6eb841e40879a7f0fcbe1ea00ceb3996c2845d | ddfff57b91a701e2f1d99f0bf2d80d2441b360b8 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b8a582ff6..7d57b3307 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ and this project does not currently adhere to a particular versioning scheme.
- Fix local definitions not being desugared properly. ([#623][gh-623])
- Expand references to functions gener... | [
"CHANGELOG.md",
"src/net/hvm_to_net.rs"
] | [] | true | ||
HigherOrderCO/Bend | 614 | issue_to_patch | Dont allow repeated field names | 2cb3d9c5c00c1b3abf7d1f9bbba57859e19d8dd3 | a310138a70a1c70cfd55532c86a83763cd752945 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index eb0bfac90..0cc627799 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -35,6 +35,7 @@ and this project does not currently adhere to a particular versioning scheme.
- Add `elif` chains to functional syntax. ([#596][gh-596])
- Add local definitions to imperative syntax. ([#5... | [
"CHANGELOG.md",
"src/fun/parser.rs",
"src/imp/mod.rs",
"src/imp/parser.rs",
"tests/golden_tests/parse_file/repeated_datatype_name.bend",
"tests/snapshots/parse_file__repeated_datatype_name.bend.snap"
] | [] | diff --git a/tests/golden_tests/parse_file/repeated_datatype_name.bend b/tests/golden_tests/parse_file/repeated_datatype_name.bend
new file mode 100644
index 000000000..09b9c939e
--- /dev/null
+++ b/tests/golden_tests/parse_file/repeated_datatype_name.bend
@@ -0,0 +1,8 @@
+type Expr
+ = (Lit Int)
+ | (Plus Expr Expr)... | true | ||
HigherOrderCO/Bend | 644 | issue_to_patch | References in main aren't expanded when they're inside lists
### Reproducing the behavior
We want programs like the following to actually execute the functions in the list
```py
def main():
return [
do_thing1,
do_thing2,
do_thing3,
]
```
This currently works for some things, like tuples, ra... | #642 #643 Make `expand_main` deal with more cases (extracted combinators, constructors) | Closes both #643 and #642 | b53568a6202eebc9433cb65536fdbfebdcf150e8 | b3ccb756069526a7369c3d582bf99e172aa1465d | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1b340dcca..4596a183e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,8 @@ and this project does not currently adhere to a particular versioning scheme.
- Fix variable binding in pattern matching when the irrefutable pattern optimization occurs. ([#618][gh-618])
... | [
"CHANGELOG.md",
"src/fun/transform/definition_pruning.rs",
"src/fun/transform/expand_main.rs",
"src/fun/transform/float_combinators.rs",
"src/lib.rs",
"tests/golden_tests/run_file/expand_main_combinator.bend",
"tests/golden_tests/run_file/expand_main_list.bend",
"tests/golden_tests/run_file/names_hyph... | [
{
"comment": "```suggestion\r\n- Don't warn on unused generated definitions. ([#514][gh-514])\r\n```\r\nAccidentally slipped part of a git command into this file",
"path": "CHANGELOG.md",
"hunk": "@@ -10,8 +10,10 @@ and this project does not currently adhere to a particular versioning scheme.\n ### Fixe... | diff --git a/tests/golden_tests/run_file/expand_main_combinator.bend b/tests/golden_tests/run_file/expand_main_combinator.bend
new file mode 100644
index 000000000..8ab184474
--- /dev/null
+++ b/tests/golden_tests/run_file/expand_main_combinator.bend
@@ -0,0 +1,5 @@
+# It should reduce to `@a (a 1 2)` if main is expand... | true |
HigherOrderCO/Bend | 644 | comment_to_fix | #642 #643 Make `expand_main` deal with more cases (extracted combinators, constructors) | ```suggestion
- Don't warn on unused generated definitions. ([#514][gh-514])
```
Accidentally slipped part of a git command into this file | b53568a6202eebc9433cb65536fdbfebdcf150e8 | b3ccb756069526a7369c3d582bf99e172aa1465d | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1b340dcca..4596a183e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,8 @@ and this project does not currently adhere to a particular versioning scheme.
- Fix variable binding in pattern matching when the irrefutable pattern optimization occurs. ([#618][gh-618])
... | [
"CHANGELOG.md"
] | [
{
"comment": "```suggestion\r\n- Don't warn on unused generated definitions. ([#514][gh-514])\r\n```\r\nAccidentally slipped part of a git command into this file",
"path": "CHANGELOG.md",
"hunk": "@@ -10,8 +10,10 @@ and this project does not currently adhere to a particular versioning scheme.\n ### Fixe... | true | ||
HigherOrderCO/Bend | 654 | issue_to_patch | Hexadecimal and binary floating-point numbers
### Reproducing the behavior
Bend currently allows numbers to be defined using hexadecimal base by pre-pending `0x` to them, like `0xA1`. It also allows these numbers to be floating-point, like `0xA1.0`. However, every digit after the dot is not treated as hexadecimal, ... | #648 Hexadecimal and binary floating-point numbers | c426087d095dff116c63f8831c1c6915611ad23f | 696ad66487d2ae331c30b55b76768c736176b75e | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e33c951c8..b8a582ff6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -28,6 +28,7 @@ and this project does not currently adhere to a particular versioning scheme.
- Change tuple syntax to not require parentheses in some cases. ([#554][gh-554])
- Improve error messages in ... | [
"CHANGELOG.md",
"docs/syntax.md",
"src/fun/parser.rs",
"tests/golden_tests/parse_file/bad_floating.bend",
"tests/golden_tests/run_file/floating_numbers.bend",
"tests/snapshots/parse_file__bad_floating.bend.snap",
"tests/snapshots/run_file__floating_numbers.bend.snap"
] | [
{
"comment": "Won't this be incorrect if there's a `_` in the fractional part? The right way would be to get the log of the number in the radix base I think",
"path": "src/fun/parser.rs",
"hunk": "@@ -1518,80 +1518,85 @@ pub trait ParserCommons<'a>: Parser<'a> {\n let radix = match self.peek_many(2)... | diff --git a/tests/golden_tests/parse_file/bad_floating.bend b/tests/golden_tests/parse_file/bad_floating.bend
new file mode 100644
index 000000000..01171241c
--- /dev/null
+++ b/tests/golden_tests/parse_file/bad_floating.bend
@@ -0,0 +1,2 @@
+def main:
+ return 0xA.0xA
diff --git a/tests/golden_tests/run_file/floatin... | true | |
HigherOrderCO/Bend | 654 | comment_to_fix | #648 Hexadecimal and binary floating-point numbers | Won't this be incorrect if there's a `_` in the fractional part? The right way would be to get the log of the number in the radix base I think | c426087d095dff116c63f8831c1c6915611ad23f | 696ad66487d2ae331c30b55b76768c736176b75e | diff --git a/src/fun/parser.rs b/src/fun/parser.rs
index 904c94044..3046070f3 100644
--- a/src/fun/parser.rs
+++ b/src/fun/parser.rs
@@ -1518,80 +1518,85 @@ pub trait ParserCommons<'a>: Parser<'a> {
let radix = match self.peek_many(2) {
Some("0x") => {
self.advance_many(2);
- 16
+ Rad... | [
"src/fun/parser.rs"
] | [
{
"comment": "Won't this be incorrect if there's a `_` in the fractional part? The right way would be to get the log of the number in the radix base I think",
"path": "src/fun/parser.rs",
"hunk": "@@ -1518,80 +1518,85 @@ pub trait ParserCommons<'a>: Parser<'a> {\n let radix = match self.peek_many(2)... | true | ||
HigherOrderCO/Bend | 654 | comment_to_fix | #648 Hexadecimal and binary floating-point numbers | You could just use `fra_str.len()` directly here
```rs
self.advance_one();
let fra_str = self.take_while(|c| c.is_digit(radix as u32) || c == '_');
let fra = u32::from_str_radix(&fra_str, radix as u32).map_err(|e| e.to_string())?;
let fra = fra as f32 / (radix.to_f32()).powi(fra_str.len() a... | c426087d095dff116c63f8831c1c6915611ad23f | 696ad66487d2ae331c30b55b76768c736176b75e | diff --git a/src/fun/parser.rs b/src/fun/parser.rs
index 904c94044..3046070f3 100644
--- a/src/fun/parser.rs
+++ b/src/fun/parser.rs
@@ -1518,80 +1518,85 @@ pub trait ParserCommons<'a>: Parser<'a> {
let radix = match self.peek_many(2) {
Some("0x") => {
self.advance_many(2);
- 16
+ Rad... | [
"src/fun/parser.rs"
] | [
{
"comment": "You could just use `fra_str.len()` directly here\r\n```rs\r\n self.advance_one();\r\n let fra_str = self.take_while(|c| c.is_digit(radix as u32) || c == '_');\r\n let fra = u32::from_str_radix(&fra_str, radix as u32).map_err(|e| e.to_string())?;\r\n let fra = fra as f32 / (radi... | true | ||
HigherOrderCO/Bend | 656 | issue_to_patch | Fix fun syntax with/wrap example | c426087d095dff116c63f8831c1c6915611ad23f | 89de2e1cded8dbac88c679e0fcc7fef3201e5db7 | diff --git a/docs/syntax.md b/docs/syntax.md
index ad8559095..d209b6f74 100644
--- a/docs/syntax.md
+++ b/docs/syntax.md
@@ -1093,7 +1093,7 @@ Result/wrap x = (Result/Ok x)
with Result {
ask x = (some_operation ...)
ask y = (some_operation ...)
- wrap(x * y)
+ (wrap (* x y))
}
```
| [
"docs/syntax.md"
] | [
{
"comment": "It's missing a second parentheses after the last one\r\n```\r\n(wrap (* x y))\r\n```",
"path": "docs/syntax.md",
"hunk": "@@ -1093,7 +1093,7 @@ Result/wrap x = (Result/Ok x)\n with Result {\n ask x = (some_operation ...)\n ask y = (some_operation ...)\n- wrap(x * y)\n+ (wrap (* x y)"... | true | |||
HigherOrderCO/Bend | 652 | issue_to_patch | Monadic operations inside `match` nested inside `with` have unexpected behaviour
### Reproducing the behavior
When writing a monadic operation inside of a pattern matching statement nested inside a `with` block, the value returned by the match, assigned to the variable is the bind operation.
Users will expect in... | #629 Monadic operations inside match nested inside with have unexpected behaviour | 0b6070e44e42984971f2d4ee23539b1823cb92d4 | e8d3782615d4e1aad92fb23b01d36143a8f47a97 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3f60ae636..e33c951c8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -27,6 +27,7 @@ and this project does not currently adhere to a particular versioning scheme.
- Change tuple syntax to not require parentheses in some cases. ([#554][gh-554])
- Improve error messages i... | [
"CHANGELOG.md",
"src/imp/gen_map_get.rs",
"src/imp/mod.rs",
"src/imp/order_kwargs.rs",
"src/imp/parser.rs",
"src/imp/to_fun.rs",
"src/imports/book.rs",
"tests/golden_tests/compile_file/mismatched_ask_statements.bend",
"tests/golden_tests/desugar_file/ask_branch.bend",
"tests/snapshots/compile_file... | [
{
"comment": "Remove these comments",
"path": "src/imp/parser.rs",
"hunk": "@@ -496,10 +496,18 @@ impl<'a> PyParser<'a> {\n let val = self.parse_expr(true, true)?;\n self.skip_trivia_inline()?;\n self.try_consume_exactly(\";\");\n- self.consume_indent_exactly(*indent)?;\n- le... | diff --git a/tests/golden_tests/compile_file/mismatched_ask_statements.bend b/tests/golden_tests/compile_file/mismatched_ask_statements.bend
new file mode 100644
index 000000000..ba41a78ff
--- /dev/null
+++ b/tests/golden_tests/compile_file/mismatched_ask_statements.bend
@@ -0,0 +1,12 @@
+type Bool:
+ T
+ F
+
+def ma... | true | |
HigherOrderCO/Bend | 652 | comment_to_fix | #629 Monadic operations inside match nested inside with have unexpected behaviour | Remove these comments | 0b6070e44e42984971f2d4ee23539b1823cb92d4 | e8d3782615d4e1aad92fb23b01d36143a8f47a97 | diff --git a/src/imp/parser.rs b/src/imp/parser.rs
index c757a5142..fe6b94bbc 100644
--- a/src/imp/parser.rs
+++ b/src/imp/parser.rs
@@ -496,10 +496,15 @@ impl<'a> PyParser<'a> {
let val = self.parse_expr(true, true)?;
self.skip_trivia_inline()?;
self.try_consume_exactly(";");
- self.consume_i... | [
"src/imp/parser.rs"
] | [
{
"comment": "Remove these comments",
"path": "src/imp/parser.rs",
"hunk": "@@ -496,10 +496,18 @@ impl<'a> PyParser<'a> {\n let val = self.parse_expr(true, true)?;\n self.skip_trivia_inline()?;\n self.try_consume_exactly(\";\");\n- self.consume_indent_exactly(*indent)?;\n- le... | true | ||
HigherOrderCO/Bend | 651 | issue_to_patch | `with` blocks give a false error when the bind function comes from an import
### Reproducing the behavior
The following program errors with `Could not find definition MyOption/bind for type MyOption.`
```py
## In lib/MyOption.bend ##
type MyOption = (Some val) | (None)
def MyOption/bind(val, nxt):
match va... | #636 with blocks give a false error when the bind function comes from an import | 3e182caf2574ef2ea3a998ba02d04c9bcc535571 | fc7db0eaf185057f0b9aae7e6343ecdda1bc97ab | diff --git a/src/imports/book.rs b/src/imports/book.rs
index 767aca194..08296daad 100644
--- a/src/imports/book.rs
+++ b/src/imports/book.rs
@@ -114,6 +114,7 @@ impl ParseBook {
let main_imports = main_imports.unwrap_or(&self.import_ctx.map);
let mut local_imports = BindMap::new();
+ let mut adt_imports ... | [
"src/imports/book.rs",
"tests/golden_tests/import_system/import_type.bend",
"tests/golden_tests/import_system/lib/MyOption.bend",
"tests/snapshots/import_system__import_type.bend.snap"
] | [] | diff --git a/tests/golden_tests/import_system/import_type.bend b/tests/golden_tests/import_system/import_type.bend
new file mode 100644
index 000000000..f2908c28d
--- /dev/null
+++ b/tests/golden_tests/import_system/import_type.bend
@@ -0,0 +1,7 @@
+from lib/MyOption import (MyOption, MyOption/bind, MyOption/wrap)
+
+d... | true | |
HigherOrderCO/Bend | 647 | issue_to_patch | Improve error message when failing to parse a top level
**Is your feature request related to a problem? Please describe.**
If there's a problem parsing a top level, we usually get `expected: pattern-matching pattern` which is the default case of a top-level not being any of the ones marked by a keyword.
These cases ... | #477 Improve error message when failing to parse a top level | 1be093b40549f6529145dd71fdf06220dab702c9 | 646011ee0d92657a8e401920155eb0bfc9605820 | diff --git a/src/fun/parser.rs b/src/fun/parser.rs
index 6027a914a..904c94044 100644
--- a/src/fun/parser.rs
+++ b/src/fun/parser.rs
@@ -326,24 +326,28 @@ impl<'a> TermParser<'a> {
Ok(vec![import])
}
- fn parse_rule(&mut self) -> ParseResult<(Name, Rule)> {
- // (name pat*) = term
- // name pat* = term... | [
"src/fun/parser.rs",
"tests/golden_tests/parse_file/strange_pattern.bend",
"tests/snapshots/compile_file__just_a_name.bend.snap",
"tests/snapshots/parse_file__strange_pattern.bend.snap"
] | [] | diff --git a/tests/golden_tests/parse_file/strange_pattern.bend b/tests/golden_tests/parse_file/strange_pattern.bend
new file mode 100644
index 000000000..9843e1b8f
--- /dev/null
+++ b/tests/golden_tests/parse_file/strange_pattern.bend
@@ -0,0 +1,1 @@
+main & = (a b c)
diff --git a/tests/snapshots/compile_file__just_a_... | true | |
HigherOrderCO/Bend | 646 | issue_to_patch | Update README.md | haven't it already. -> haven't already.
I apologize for the minutia. Perhaps incorporate this in another merge. | 2232a708e3b510b23bcd34a7535a597db834e7a5 | 915749d64a07c356f7fda942fb0c7a424f060e68 | diff --git a/README.md b/README.md
index 47aed4afa..836ccfb71 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,7 @@ Bend is powered by the [HVM2](https://github.com/higherorderco/hvm) runtime.
#### On Linux
```sh
-# Install Rust if you haven't it already.
+# Install Rust if you haven't already.
curl --proto '=h... | [
"README.md"
] | [] | true | ||
HigherOrderCO/Bend | 645 | issue_to_patch | Improve error message when program is missing arm of branching statement
for example
```
def is_even(n):
if n % 2 == 0:
return 1
else:
return 0
def get_even_sum_under_if(this_number):
bend current = 0:
when current < this_number:
new_num = fork(current + is_even(current))
return new... | #464 Improve error message when program is missing arm of branching statement | 2232a708e3b510b23bcd34a7535a597db834e7a5 | 477f143077971b9deb2d9b53da6146d19314c4eb | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4596a183e..3f60ae636 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -26,6 +26,7 @@ and this project does not currently adhere to a particular versioning scheme.
### Changed
- Change tuple syntax to not require parentheses in some cases. ([#554][gh-554])
+- Improve err... | [
"CHANGELOG.md",
"src/fun/transform/float_combinators.rs",
"src/imp/parser.rs",
"src/lib.rs",
"tests/golden_tests/parse_file/bend_missing_else.bend",
"tests/golden_tests/parse_file/fold_missing_case.bend",
"tests/golden_tests/parse_file/if_missing_else.bend",
"tests/golden_tests/parse_file/match_missin... | [
{
"comment": "Why is this needed here in the `mod` declaration?",
"path": "src/lib.rs",
"hunk": "@@ -14,6 +14,7 @@ use diagnostics::{Diagnostics, DiagnosticsConfig, ERR_INDENT_SIZE};\n use net::hvm_to_net::hvm_to_net;\n \n pub mod diagnostics;\n+#[allow(clippy::mutable_key_type)]",
"resolving_sha": ... | diff --git a/tests/golden_tests/parse_file/bend_missing_else.bend b/tests/golden_tests/parse_file/bend_missing_else.bend
new file mode 100644
index 000000000..f72aea128
--- /dev/null
+++ b/tests/golden_tests/parse_file/bend_missing_else.bend
@@ -0,0 +1,15 @@
+def is_even(n):
+ if n % 2 == 0:
+ return 1
+ else:
+ ... | true | |
HigherOrderCO/Bend | 645 | comment_to_fix | #464 Improve error message when program is missing arm of branching statement | Why is this needed here in the `mod` declaration? | 2232a708e3b510b23bcd34a7535a597db834e7a5 | 477f143077971b9deb2d9b53da6146d19314c4eb | diff --git a/src/lib.rs b/src/lib.rs
index e5dfe9a33..2af6bf988 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -14,6 +14,8 @@ use diagnostics::{Diagnostics, DiagnosticsConfig, ERR_INDENT_SIZE};
use net::hvm_to_net::hvm_to_net;
pub mod diagnostics;
+// `Name` triggers this warning, but it's safe because we're not using... | [
"src/lib.rs"
] | [
{
"comment": "Why is this needed here in the `mod` declaration?",
"path": "src/lib.rs",
"hunk": "@@ -14,6 +14,7 @@ use diagnostics::{Diagnostics, DiagnosticsConfig, ERR_INDENT_SIZE};\n use net::hvm_to_net::hvm_to_net;\n \n pub mod diagnostics;\n+#[allow(clippy::mutable_key_type)]",
"resolving_sha": ... | true | ||
HigherOrderCO/Bend | 645 | comment_to_fix | #464 Improve error message when program is missing arm of branching statement | ```suggestion
.or(self.expected_spanned("'case'", self.index..self.index + 1));
```
Can you put this between `'` like we do for things we `consume`?
Same thing for all the other changed lines. | 2232a708e3b510b23bcd34a7535a597db834e7a5 | 477f143077971b9deb2d9b53da6146d19314c4eb | diff --git a/src/imp/parser.rs b/src/imp/parser.rs
index 82f9dc92a..c757a5142 100644
--- a/src/imp/parser.rs
+++ b/src/imp/parser.rs
@@ -575,7 +575,9 @@ impl<'a> PyParser<'a> {
indent.exit_level();
if nxt_indent != *indent {
- return self.expected_indent(*indent, nxt_indent);
+ return self
+ ... | [
"src/imp/parser.rs"
] | [
{
"comment": "```suggestion\r\n .or(self.expected_spanned(\"'case'\", self.index..self.index + 1));\r\n```\r\nCan you put this between `'` like we do for things we `consume`?\r\n\r\nSame thing for all the other changed lines.",
"path": "src/imp/parser.rs",
"hunk": "@@ -728,7 +732,9 @@ impl<'a> ... | true | ||
HigherOrderCO/Bend | 637 | issue_to_patch | Tuples should be defined by commas(like python), not by parentheses
**Is your feature request related to a problem? Please describe.**
In python, it is the commas, not the parentheses, that define the tuple. Not sure whether it's worth the effort to change this or whether there is a specific reason that it has to be ... | #554 tuples should be defined by commas like python not by parentheses | Tuples without parentheses are now freely accepted in assignments, returns and lambdas, in other cases we must use `(..., ...)` | 060239a05535ed59ada13794fe948ebff4f9a221 | 61af9c1102a849f414816b8413163819922c0005 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 66dae9232..5fb5b8366 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,6 +19,10 @@ and this project does not currently adhere to a particular versioning scheme.
- Add multi line comment `#{ ... #}` syntax. ([#595][gh-595])
- Add error message when input file is not fou... | [
"CHANGELOG.md",
"docs/syntax.md",
"src/imp/parser.rs",
"tests/golden_tests/parse_file/tuple_assign.bend",
"tests/golden_tests/parse_file/tuple_commas.bend",
"tests/golden_tests/parse_file/tuple_need_parens.bend",
"tests/snapshots/parse_file__tuple_assign.bend.snap",
"tests/snapshots/parse_file__tuple_... | [] | diff --git a/tests/golden_tests/parse_file/tuple_assign.bend b/tests/golden_tests/parse_file/tuple_assign.bend
new file mode 100644
index 000000000..674842efe
--- /dev/null
+++ b/tests/golden_tests/parse_file/tuple_assign.bend
@@ -0,0 +1,3 @@
+def main:
+ first, second = 1, (2, 3)
+ return second
diff --git a/tests/g... | true |
HigherOrderCO/Bend | 624 | issue_to_patch | Add IO for loading and calling dynamically linked libraries
**Is your feature request related to a problem? Please describe.**
Hvm added dylib support in https://github.com/HigherOrderCO/HVM/pull/394, but it was never added to Bend.
**Describe the solution you'd like**
Expose the dylib functions dl_open, dl_call,... | #621 Add dylib IO functions | 060239a05535ed59ada13794fe948ebff4f9a221 | 3c042d4b0cc4cf20c28e68668b195dd2dd693975 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 66dae9232..dee675c07 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,8 @@ and this project does not currently adhere to a particular versioning scheme.
- Add import system. ([#544][gh-544])
- Add multi line comment `#{ ... #}` syntax. ([#595][gh-595])
- Add er... | [
"CHANGELOG.md",
"cspell.json",
"docs/builtins.md",
"docs/ffi.md",
"examples/fusing_not.bend",
"examples/hello_world.bend",
"examples/parallel_sum.bend",
"src/fun/builtins.bend",
"src/fun/builtins.rs",
"src/lib.rs",
"tests/golden_tests.rs",
"tests/golden_tests/run_file/basic_num_ops.bend",
"t... | [
{
"comment": "```suggestion\r\n# Needs to be compiled as a shared library with unresolved symbols.\r\n# For macOS:\r\ngcc -shared -o libbend_dirs.so -I /path/to/hvm/ libbend_dirs.c -undefined dynamic_lookup\r\n\r\n# For Linux:\r\ngcc -shared -o libbend_dirs.so -I /path/to/hvm/ libbend_dirs.c -Wl,--unresolved-sy... | diff --git a/tests/golden_tests.rs b/tests/golden_tests.rs
index d1334e916..a377c24ff 100644
--- a/tests/golden_tests.rs
+++ b/tests/golden_tests.rs
@@ -1,9 +1,7 @@
use bend::{
compile_book, desugar_book,
diagnostics::{Diagnostics, DiagnosticsConfig, Severity},
- fun::{
- load_book::do_parse_book_default, ne... | true | |
HigherOrderCO/Bend | 624 | comment_to_fix | #621 Add dylib IO functions | ```suggestion
# Needs to be compiled as a shared library with unresolved symbols.
# For macOS:
gcc -shared -o libbend_dirs.so -I /path/to/hvm/ libbend_dirs.c -undefined dynamic_lookup
# For Linux:
gcc -shared -o libbend_dirs.so -I /path/to/hvm/ libbend_dirs.c -Wl,--unresolved-symbols=ignore-all
``` | 060239a05535ed59ada13794fe948ebff4f9a221 | 3c042d4b0cc4cf20c28e68668b195dd2dd693975 | diff --git a/docs/ffi.md b/docs/ffi.md
new file mode 100644
index 000000000..0c770b6ad
--- /dev/null
+++ b/docs/ffi.md
@@ -0,0 +1,213 @@
+# Dynamically linked libraries and foreign functions
+
+We can add new IO functions to Bend during runtime by loading dynamic libraries.
+
+## Using IO dynamic libraries in Bend
+
+H... | [
"docs/ffi.md"
] | [
{
"comment": "```suggestion\r\n# Needs to be compiled as a shared library with unresolved symbols.\r\n# For macOS:\r\ngcc -shared -o libbend_dirs.so -I /path/to/hvm/ libbend_dirs.c -undefined dynamic_lookup\r\n\r\n# For Linux:\r\ngcc -shared -o libbend_dirs.so -I /path/to/hvm/ libbend_dirs.c -Wl,--unresolved-sy... | true | ||
HigherOrderCO/Bend | 624 | comment_to_fix | #621 Add dylib IO functions | ```suggestion
# Needs to be compiled as a shared library with unresolved symbols.
# For macOS:
gcc -shared -o libbend_dirs.so -I /path/to/HVM/src/ libbend_dirs.c -undefined dynamic_lookup -fPIC
# For Linux:
gcc -shared -o libbend_dirs.so -I /path/to/HVM/src/ libbend_dirs.c -Wl,--unresolved-symbols=ignore-all -fP... | 060239a05535ed59ada13794fe948ebff4f9a221 | 3c042d4b0cc4cf20c28e68668b195dd2dd693975 | diff --git a/docs/ffi.md b/docs/ffi.md
new file mode 100644
index 000000000..0c770b6ad
--- /dev/null
+++ b/docs/ffi.md
@@ -0,0 +1,213 @@
+# Dynamically linked libraries and foreign functions
+
+We can add new IO functions to Bend during runtime by loading dynamic libraries.
+
+## Using IO dynamic libraries in Bend
+
+H... | [
"docs/ffi.md"
] | [
{
"comment": "```suggestion\r\n# Needs to be compiled as a shared library with unresolved symbols.\r\n# For macOS:\r\ngcc -shared -o libbend_dirs.so -I /path/to/HVM/src/ libbend_dirs.c -undefined dynamic_lookup -fPIC\r\n\r\n# For Linux:\r\ngcc -shared -o libbend_dirs.so -I /path/to/HVM/src/ libbend_dirs.c -Wl,-... | true | ||
HigherOrderCO/Bend | 630 | issue_to_patch | #620 Changed `bend run` to `bend run-rs` and `bend run` defaults to the C implementation | Solves #620 | e239264575fe5c89d2c55b0d39cbd0401d25b44f | 6380803dae279d388300b3bc0524d86a11c604ae | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 99f1b9fcf..66dae9232 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -52,6 +52,7 @@ and this project does not currently adhere to a particular versioning scheme.
- Add repeated field name error message.
- Add `Math` builtin functions. ([#570][gh-570])
- Add primitive fi... | [
"CHANGELOG.md",
"README.md",
"src/main.rs",
"tests/snapshots/cli__debug_list_map.bend.snap",
"tests/snapshots/cli__debug_u60_to_nat.bend.snap"
] | [
{
"comment": "Since run and run-c are doing the same thing you can remove it and specify run as an alias for run-c",
"path": "src/main.rs",
"hunk": "@@ -48,9 +48,11 @@ enum Mode {\n path: PathBuf,\n },\n /// Compiles the program and runs it with the Rust HVM implementation.\n- Run(RunArgs),\n+ ... | diff --git a/tests/snapshots/cli__debug_list_map.bend.snap b/tests/snapshots/cli__debug_list_map.bend.snap
index de105f53b..faa906525 100644
--- a/tests/snapshots/cli__debug_list_map.bend.snap
+++ b/tests/snapshots/cli__debug_list_map.bend.snap
@@ -6,6 +6,6 @@ error: unexpected argument '-d' found
tip: to pass '-d... | true | |
HigherOrderCO/Bend | 630 | comment_to_fix | #620 Changed `bend run` to `bend run-rs` and `bend run` defaults to the C implementation | Since run and run-c are doing the same thing you can remove it and specify run as an alias for run-c | e239264575fe5c89d2c55b0d39cbd0401d25b44f | 6380803dae279d388300b3bc0524d86a11c604ae | diff --git a/src/main.rs b/src/main.rs
index b6fdcd315..82f3cc230 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -48,8 +48,9 @@ enum Mode {
path: PathBuf,
},
/// Compiles the program and runs it with the Rust HVM implementation.
- Run(RunArgs),
+ RunRs(RunArgs),
/// Compiles the program and runs it with ... | [
"src/main.rs"
] | [
{
"comment": "Since run and run-c are doing the same thing you can remove it and specify run as an alias for run-c",
"path": "src/main.rs",
"hunk": "@@ -48,9 +48,11 @@ enum Mode {\n path: PathBuf,\n },\n /// Compiles the program and runs it with the Rust HVM implementation.\n- Run(RunArgs),\n+ ... | true | ||
HigherOrderCO/Bend | 628 | issue_to_patch | Improve error message when the input file is not found
Currently, we just forward the message given by `std::fs::read_to_string`: `No such file or directory (os error 2)`.
We should instead give an error that more properly explains what went wrong.
Also, this same error message will show up when the HVM doesn't find ... | #513 Improve error message when the input file is not found | 6bbc2230481f9e1294365c98258b4f34cd6feec7 | 2f8062bc5fbb5e2663289f56adb8eeaea976d5be | diff --git a/CHANGELOG.md b/CHANGELOG.md
index f73f6814c..99f1b9fcf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,7 @@ and this project does not currently adhere to a particular versioning scheme.
- Add import system. ([#544][gh-544])
- Add multi line comment `#{ ... #}` syntax. ([#595][gh-595])
+- Add ... | [
"CHANGELOG.md",
"src/fun/load_book.rs",
"tests/golden_tests/cli/input_file_not_found.args",
"tests/golden_tests/cli/input_file_not_found.bend",
"tests/snapshots/cli__input_file_not_found.bend.snap"
] | [] | diff --git a/tests/golden_tests/cli/input_file_not_found.args b/tests/golden_tests/cli/input_file_not_found.args
new file mode 100644
index 000000000..b5f6bc09c
--- /dev/null
+++ b/tests/golden_tests/cli/input_file_not_found.args
@@ -0,0 +1,2 @@
+run
+tests/golden_tests/missing_dir/input_file_not_found.bend
diff --git ... | true | |
HigherOrderCO/Bend | 625 | issue_to_patch | Add multi line comment syntax | 29f2098ce5ffa453674cbe1e0437d40ddd0ced3b | 6020fbac8e0054a471c31cc956a34f77c03dc500 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index c647f9a39..f73f6814c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,10 +11,12 @@ and this project does not currently adhere to a particular versioning scheme.
- Fix variable binding in pattern matching when the irrefutable pattern optimization occurs. ([#618][gh-61... | [
"CHANGELOG.md",
"src/fun/builtins.rs",
"src/fun/display.rs",
"src/fun/mod.rs",
"src/fun/parser.rs",
"src/fun/transform/desugar_match_defs.rs",
"src/fun/transform/desugar_open.rs",
"src/fun/transform/fix_match_defs.rs",
"src/fun/transform/fix_match_terms.rs",
"src/fun/transform/lift_local_defs.rs",... | [
{
"comment": "You can remove these comments",
"path": "src/fun/mod.rs",
"hunk": "@@ -199,9 +199,11 @@ pub enum Term {\n nam: Name,\n },\n Def {\n- nam: Name,\n- rules: Vec<Rule>,\n+ def: Definition,\n nxt: Box<Term>,\n+ // nam: Name,",
"resolving_sha": "6020fbac8e0054a471c31c... | diff --git a/tests/golden_tests/parse_file/multi_line_comment.bend b/tests/golden_tests/parse_file/multi_line_comment.bend
new file mode 100644
index 000000000..23d7d39bc
--- /dev/null
+++ b/tests/golden_tests/parse_file/multi_line_comment.bend
@@ -0,0 +1,55 @@
+#{
+
+
+
+
+#}
+
+def main:
+ #{
+ ok
+ #}#
+ #
+ re... | true | ||
HigherOrderCO/Bend | 625 | comment_to_fix | Add multi line comment syntax | You can remove these comments | 29f2098ce5ffa453674cbe1e0437d40ddd0ced3b | 6020fbac8e0054a471c31cc956a34f77c03dc500 | diff --git a/src/fun/mod.rs b/src/fun/mod.rs
index 04a14d1b8..5d7c687e6 100644
--- a/src/fun/mod.rs
+++ b/src/fun/mod.rs
@@ -65,14 +65,14 @@ pub type Adts = IndexMap<Name, Adt>;
pub type Constructors = IndexMap<Name, Name>;
/// A pattern matching function definition.
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone,... | [
"src/fun/mod.rs"
] | [
{
"comment": "You can remove these comments",
"path": "src/fun/mod.rs",
"hunk": "@@ -199,9 +199,11 @@ pub enum Term {\n nam: Name,\n },\n Def {\n- nam: Name,\n- rules: Vec<Rule>,\n+ def: Definition,\n nxt: Box<Term>,\n+ // nam: Name,",
"resolving_sha": "6020fbac8e0054a471c31c... | true | ||
HigherOrderCO/Bend | 619 | issue_to_patch | #598 Add file IO flush function | Solves #598
I had a little difficulty testing. This runs without bugs but doesn't write to the file when I run my bend program. Am I missing something here? I also built both bend and hvm from the main branch.
```
def main:
file = IO/FS/open("file.txt", "w+")
data = "Hello, World!"
write = IO/FS/write(f... | 57d6798e9aa9ced264a9b7115ec48a541c1604fa | b9e294f738515ac2f2537d58a58c6430609ac349 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 14c703554..c647f9a39 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -48,6 +48,7 @@ and this project does not currently adhere to a particular versioning scheme.
- Add local definitions to functional syntax.
- Add repeated field name error message.
- Add `Math` builtin ... | [
"CHANGELOG.md",
"docs/builtins.md",
"src/fun/builtins.bend"
] | [] | true | ||
HigherOrderCO/Bend | 544 | issue_to_patch | Don't warn on unused generated definitions
When a definition is unused, all of it's generated children will also be unused, which leads to the user-provided function to be printed many times as unused.
For example
```
def inc(bits):
match bits:
case Bits/E:
return Bits/I (Bits/E)
case Bits/O:
re... | Add import system | Todo:
- [x] https://github.com/HigherOrderCO/Bend-Package-Manager/issues/15
- [x] https://github.com/HigherOrderCO/Bend-Package-Manager/issues/7
- [x] https://github.com/HigherOrderCO/Bend-Package-Manager/issues/8
- [x] https://github.com/HigherOrderCO/Bend-Package-Manager/issues/13
- [x] https://github.com/Higher... | a2b75ffa3fcbc7dbe494c5837382207b384f593b | cd2a58b36ae2d3b1c9e69a7913c762158a503c97 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b73982a9f..14c703554 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,11 @@ and this project does not currently adhere to a particular versioning scheme.
### Fixed
- Fix variable binding in pattern matching when the irrefutable pattern optimization occurs. ([#... | [
"CHANGELOG.md",
"docs/imports.md",
"docs/syntax.md",
"src/diagnostics.rs",
"src/fun/builtins.rs",
"src/fun/check/set_entrypoint.rs",
"src/fun/load_book.rs",
"src/fun/mod.rs",
"src/fun/parser.rs",
"src/fun/term_to_net.rs",
"src/fun/transform/definition_merge.rs",
"src/fun/transform/definition_p... | [
{
"comment": "Can you add comments explaining what this trait is, and how to implement it?",
"path": "src/imports.rs",
"hunk": "@@ -0,0 +1,766 @@\n+use crate::{\n+ diagnostics::{Diagnostics, DiagnosticsConfig, WarningType},\n+ fun::{load_book::do_parse_book, parser::ParseBook, Adt, Book, Definition, N... | diff --git a/tests/golden_tests.rs b/tests/golden_tests.rs
index eb18d17ed..d1334e916 100644
--- a/tests/golden_tests.rs
+++ b/tests/golden_tests.rs
@@ -1,8 +1,12 @@
use bend::{
compile_book, desugar_book,
diagnostics::{Diagnostics, DiagnosticsConfig, Severity},
- fun::{load_book::do_parse_book, net_to_term::ne... | true |
HigherOrderCO/Bend | 544 | comment_to_fix | Add import system | I think you should add a section about importing types specifically, since it has slightly different behaviour and is super common. | a2b75ffa3fcbc7dbe494c5837382207b384f593b | cd2a58b36ae2d3b1c9e69a7913c762158a503c97 | diff --git a/docs/imports.md b/docs/imports.md
new file mode 100644
index 000000000..ada25cd6f
--- /dev/null
+++ b/docs/imports.md
@@ -0,0 +1,181 @@
+# Import System
+
+## Case Sensitivity
+All import paths are case-sensitive. Ensure that the case used in import statements matches exactly with the file and directory na... | [
"docs/imports.md"
] | [
{
"comment": "I think you should add a section about importing types specifically, since it has slightly different behaviour and is super common.",
"path": "docs/imports.md",
"hunk": "@@ -0,0 +1,150 @@\n+# Import System\n+\n+## Case Sensitivity\n+All import paths are case-sensitive. Ensure that the case... | true | ||
HigherOrderCO/Bend | 544 | comment_to_fix | Add import system | In the end, are defs with the same name as the file being treated different or not?
Like if I do `import types/List/concat`, will it bind the function as `concat` or `concat/concat`? | a2b75ffa3fcbc7dbe494c5837382207b384f593b | cd2a58b36ae2d3b1c9e69a7913c762158a503c97 | diff --git a/docs/imports.md b/docs/imports.md
new file mode 100644
index 000000000..ada25cd6f
--- /dev/null
+++ b/docs/imports.md
@@ -0,0 +1,181 @@
+# Import System
+
+## Case Sensitivity
+All import paths are case-sensitive. Ensure that the case used in import statements matches exactly with the file and directory na... | [
"docs/imports.md"
] | [
{
"comment": "In the end, are defs with the same name as the file being treated different or not?\r\n\r\nLike if I do `import types/List/concat`, will it bind the function as `concat` or `concat/concat`?",
"path": "docs/imports.md",
"hunk": "@@ -0,0 +1,150 @@\n+# Import System\n+\n+## Case Sensitivity\n... | true | ||
Hmbown/CodeWhale | 2,102 | issue_to_patch | Defer-load low-value tools to shrink prefix-cache footprint
**Problem.** `crates/tui/src/tools/registry.rs` registers 50+ tools alphabetically (sorted for prefix-cache stability at `:196-200`). The tool catalog alone is ~8–12K tokens on every request that passes tools. `defer_loading` already exists for MCP tools (`:9... | Defer low-value native tools by default | ## Summary
- Defer-load native tools outside the core catalog by default so ToolSearch materializes low-frequency tools on demand.
- Add `[tools] always_load = ["..."]` config support to opt native tools back into the active catalog.
- Add `scripts/measure-tool-catalog.py` for deterministic serialized catalog byte/tok... | b3c50e0c90acf3182ceacc245abef6a6b0f34800 | aff4050d16502dddd863bcd52c0b98c82f112414 | diff --git a/config.example.toml b/config.example.toml
index 73c211f28..813326748 100644
--- a/config.example.toml
+++ b/config.example.toml
@@ -97,6 +97,12 @@ memory_path = "~/.deepseek/memory.md"
# Parsed but currently unused (reserved for future versions):
# tools_file = "./tools.json"
+# Native tool catalog con... | [
"config.example.toml",
"crates/config/src/lib.rs",
"crates/tui/src/config.rs",
"crates/tui/src/core/engine.rs",
"crates/tui/src/core/engine/tests.rs",
"crates/tui/src/core/engine/tool_catalog.rs",
"crates/tui/src/core/engine/turn_loop.rs",
"crates/tui/src/main.rs",
"crates/tui/src/runtime_threads.rs... | [
{
"comment": "<a href=\"#\"><img alt=\"P0\" src=\"https://greptile-static-assets.s3.amazonaws.com/badges/p0.svg?v=9\" align=\"top\"></a> **Undefined variable `has_api_key` — compile error**\n\n`has_api_key` is not defined anywhere in this crate; it doesn't exist as a local variable, a module-level function, or ... | true | |
Hmbown/CodeWhale | 2,811 | issue_to_patch | feat(vscode): add local runtime extension scaffold | ## Summary
- add an official `extensions/vscode` Phase 0 scaffold with commands to open CodeWhale, start `codewhale serve --http`, and check a local runtime
- add a CodeWhale activity view, status bar state, local runtime config, VSIX packaging metadata, and built extension output
- document the slice in the README/cha... | ef239dfbe486499c37f0aa6f40a9e5c043dc3b73 | bed43e79b526623d340a959c8b31ae8d2751a4b2 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 539a42c4a..0799c33db 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -39,6 +39,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
`workflow_run` tool until cancellation, replay, and worktree semantics are
release-safe. Thanks @Adit... | [
"CHANGELOG.md",
"README.md",
"crates/tui/CHANGELOG.md",
"extensions/vscode/.gitignore",
"extensions/vscode/LICENSE",
"extensions/vscode/README.md",
"extensions/vscode/media/codewhale.svg",
"extensions/vscode/out/extension.js",
"extensions/vscode/out/extension.js.map",
"extensions/vscode/out/runtim... | [
{
"comment": "\n\nThe current `shellQuote` implementation uses single quotes (`'`) to wrap arguments containing special characters or spaces. While this works on Unix-like systems, it is completely broken on Windows `cmd.exe` (the default shell f... | true | ||
Hmbown/CodeWhale | 2,802 | issue_to_patch | feat(hf): add Hugging Face MCP helpers | ## Summary
- Harvests @idling11's Hugging Face MCP intent from #2782 into a narrow offline helper slice.
- Adds `/hf mcp status`, `/hf mcp setup`, `/hf concepts`, and `/huggingface` alias registration.
- Documents Hugging Face settings-generated MCP configuration and the provider/MCP/Hub distinction.
## Non-goals
- No... | fbe8d9ee5d0e83f1e95196c66659a43b91d2ac75 | 57e4a7b71af9f163c2fac883ad1c6a63294df872 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 201e648b0..90611c2b0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -57,6 +57,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
helper for future fallback routing. This preserves the requested contract
without enabling silent run... | [
"CHANGELOG.md",
"crates/tui/CHANGELOG.md",
"crates/tui/src/commands/hf.rs",
"crates/tui/src/commands/mod.rs",
"crates/tui/src/localization.rs",
"docs/MCP.md",
"docs/PROVIDERS.md"
] | [
{
"comment": "\n\nIf the MCP configuration file does not exist (which is common for a fresh installation), `crate::mcp::load_config` will return an `Err`. This results in a misleading error message being displayed to the user (\"Could not rea... | true | ||
Hmbown/CodeWhale | 2,807 | issue_to_patch | docs(npm): clarify wrapper README configuration | ## Summary
- clarify that the `codewhale` npm package is a launcher for native CodeWhale binaries
- align the npm package description with the README framing
- replace the hard-to-scan wrapper configuration bullet list with a table so continuation indentation is no longer visually confusing
## Credit
Prompted by #2783... | e8bdfcded4afbab9eb2d491584e2025827f3bea5 | 18027ae9832ac40a45edcf274bd60f746869b548 | diff --git a/npm/codewhale/README.md b/npm/codewhale/README.md
index 25fda9dc4..a35aa51b5 100644
--- a/npm/codewhale/README.md
+++ b/npm/codewhale/README.md
@@ -1,7 +1,12 @@
# codewhale
-Install and run CodeWhale, the agentic terminal for open-source and open-weight coding
-models, from GitHub release artifacts.
+In... | [
"npm/codewhale/README.md",
"npm/codewhale/package.json"
] | [
{
"comment": "\n\nThe wrapper script (`install.js`) supports fallback environment variables without the `_TUI` infix (e.g., `DEEPSEEK_RELEASE_BASE_URL`, `DEEPSEEK_FORCE_DOWNLOAD`, `DEEPSEEK_DISABLE_INSTALL`, and `DEEPSEEK_OPTIONAL_INSTALL`). ... | true | ||
Hmbown/CodeWhale | 2,103 | issue_to_patch | Empty composer: Up/Down scrolls transcript instead of navigating history on Windows
## Problem
On Windows, pressing **Up** on an **empty** composer scrolls the transcript instead of navigating to the previous submitted message. Typing even a single character and pressing Up correctly navigates input history — but an ... | fix(tui): let mouse capture keep history arrows on Windows | ## Summary
- removes the blanket Windows override from the empty-composer arrow default
- keeps the scroll fallback when mouse capture is off, including Windows conhost-style terminals
- updates the config comment and regression coverage for both Windows default cases
Fixes #1720
Credit: harvests the focused behavior... | a6bd5ac08b55f10fba7600748d80ea4295d06b64 | 050bc6d45b05cf827fd81afdde0b196c67071251 | diff --git a/crates/tui/src/config.rs b/crates/tui/src/config.rs
index b41712557..e1a430390 100644
--- a/crates/tui/src/config.rs
+++ b/crates/tui/src/config.rs
@@ -474,9 +474,9 @@ pub struct TuiConfig {
/// - Unset (default) — fall back to the `[notifications]` defaults.
pub notification_condition: Option<No... | [
"crates/tui/src/config.rs",
"crates/tui/src/tui/app.rs",
"crates/tui/src/tui/ui/tests.rs"
] | [] | true | |
Hmbown/CodeWhale | 2,771 | issue_to_patch | feat(init): harvest LLM-guided AGENTS.md init | ## Summary
- harvest #2759 / #2745 so `/init` gathers project context and delegates AGENTS.md generation to the agent instead of writing a static template
- preserve the successor PR fixes for credential-safe HTTP(S) remotes, devDependency framework detection, workspace Cargo context, and dead untracked-counter cleanup... | 95e24194ee2670531b4abba46adb72f6cf58ffd0 | b527bd507ad208451a3759cde78cbb8feeba351b | diff --git a/.github/AUTHOR_MAP b/.github/AUTHOR_MAP
index d1997277e..6b55ca302 100644
--- a/.github/AUTHOR_MAP
+++ b/.github/AUTHOR_MAP
@@ -16,6 +16,9 @@ Hu Qiantao = HUQIANTAO <58421104+HUQIANTAO@users.noreply.github.com>
huqiantao@users.noreply.github.com = HUQIANTAO <58421104+HUQIANTAO@users.noreply.github.com>
h... | [
".github/AUTHOR_MAP",
"crates/tui/src/commands/init.rs"
] | [
{
"comment": "\n\nIn Cargo, there is no `[workspace.dev-dependencies]` section. All shared workspace dependencies (including those used for development/testing) are declared under `[workspace.dependencies]`. The current check `doc.get(\"workspace... | true | ||
Hmbown/CodeWhale | 2,795 | issue_to_patch | fix(tui): enrich auth errors with request context | ## Summary
- harvests the focused auth-error diagnostics work from #2792 by @mvanhorn
- includes provider, base URL authority, model, key source, key type, and redacted key fingerprint for authentication failures
- documents the redaction boundary for the lower-level auth-context constructor
- mirrors the changelog not... | 8dbe0357d092d16abef3c50b54a7a76ed0fb9b17 | 0b0d815fab73ebf33d30d3a57b4cd035513d5d72 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9314e7747..98deb5d27 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -161,6 +161,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
+- Authentication failures now include redacted request context such as provider,
+ base ... | [
"CHANGELOG.md",
"crates/tui/CHANGELOG.md",
"crates/tui/src/error_taxonomy.rs",
"crates/tui/src/llm_client/mod.rs"
] | [
{
"comment": "\n\nIf the underlying error `message` is empty or contains only whitespace, formatting it as `\"{} ({})\"` results in a leading space and empty parentheses, e.g., `\" (provider: ...)\"`. This can make the user-facing error messa... | true | ||
Hmbown/CodeWhale | 2,779 | issue_to_patch | feat(config): add dormant provider fallback chain | ## Summary
- harvest #2777's provider fallback-chain config/data-model slice
- add `fallback_providers = [...]` parsing with empty-list serialization skipped
- add a dormant `ProviderChain` helper and tests proving runtime resolution still uses the selected primary provider
- update changelog credit for #2574/#2777 wit... | 3ca89255f15b8ca1ca6e6656cbd2af257364ac40 | 93d08a8f611a697e4f1d3fd79a029b257859b8d4 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 28b1f67f4..3cc71d06a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -53,6 +53,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
so slow local or OpenAI-compatible model servers can extend the SSE idle
timeout without mutating pro... | [
"CHANGELOG.md",
"crates/config/src/lib.rs",
"crates/tui/CHANGELOG.md"
] | [] | true | ||
Hmbown/CodeWhale | 2,794 | issue_to_patch | fix(tui): expose external URL opener on unsupported targets | ## Summary
- harvest #2789's non-desktop compile fix
- make `open_external_url` available on every target so the unconditional `AppAction::OpenExternalUrl` arm compiles
- keep unsupported-platform behavior delegated to `crate::utils::open_url`
- add @ci4ic4 to `.github/AUTHOR_MAP` and credit the NetBSD/pkgsrc packaging... | 786e5fe01ece3bd14f2158bd660c6583c74aa608 | 5d9f93af4d3f98c9f49b6344ca8b86967b7968ee | diff --git a/.github/AUTHOR_MAP b/.github/AUTHOR_MAP
index 6b55ca302..a3a218cde 100644
--- a/.github/AUTHOR_MAP
+++ b/.github/AUTHOR_MAP
@@ -74,6 +74,9 @@ xrnc@outlook.com = elowen53 <88364845+elowen53@users.noreply.github.com>
CrepuscularIRIS = CrepuscularIRIS <126939795+CrepuscularIRIS@users.noreply.github.com>
chn... | [
".github/AUTHOR_MAP",
"CHANGELOG.md",
"crates/tui/CHANGELOG.md",
"crates/tui/src/tui/ui.rs"
] | [] | true | ||
Hmbown/CodeWhale | 2,796 | issue_to_patch | feat(tui): add sidebar slash command | ## Summary
- harvests the focused `/sidebar` command from #2788 by @aboimpinto onto the v0.9 stewardship branch
- lets users toggle/show/hide the sidebar, with optional `--save` persistence for copy-heavy transcript work
- adds a mirrored changelog note crediting @mo-vic's #2766 report and @aboimpinto's fix
## Credit
... | 6d27bcaf2c31899ea8bf2b20fc93d517a07c1026 | 4a7731f69d490856b4b8e768f85edced26d9bba3 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 98deb5d27..84c0f54f5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -57,6 +57,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
helper for future fallback routing. This preserves the requested contract
without enabling silent run... | [
"CHANGELOG.md",
"crates/tui/CHANGELOG.md",
"crates/tui/src/commands/config.rs",
"crates/tui/src/commands/mod.rs",
"crates/tui/src/localization.rs"
] | [
{
"comment": "\n\nWhen the `--save` or `-s` flag is used (`persist` is true), the command calls `set_config_value` but does not call `app.set_sidebar_focus(target)`. This means the runtime sidebar focus state will not be updated in the current se... | true | ||
Hmbown/CodeWhale | 2,797 | issue_to_patch | feat(web_search): add Sofya search provider | ## Summary
- harvests #2790's Sofya search backend onto the v0.9 stewardship branch
- keeps Sofya scoped to `web_search`; this does not add a model provider or affect DeepSeek/provider routing
- adds canonical contributor identity mapping for @yusufgurdogan / `hotelswith <contact@hotelswith.com>`
- fixes review issues ... | 8e2fc978d04df6298a8f3976c79fbea8ce4544c1 | af8ff03618bdbc15cc946e72135b351a5ce9aa11 | diff --git a/.github/AUTHOR_MAP b/.github/AUTHOR_MAP
index a3a218cde..2e9f7ea3b 100644
--- a/.github/AUTHOR_MAP
+++ b/.github/AUTHOR_MAP
@@ -77,6 +77,10 @@ ChaceLyee2101 = ChaceLyee2101 <95995339+ChaceLyee2101@users.noreply.github.com>
ci4ic4 = ci4ic4 <6495973+ci4ic4@users.noreply.github.com>
Chavdar Ivanov = ci4ic4 ... | [
".github/AUTHOR_MAP",
"CHANGELOG.md",
"config.example.toml",
"crates/tui/CHANGELOG.md",
"crates/tui/src/config.rs",
"crates/tui/src/tools/web_search.rs",
"docs/CONFIGURATION.md"
] | [
{
"comment": "\n\nSince Sofya returns full extracted page content rather than snippets, the response body can be quite large. Reading the entire response into an intermediate `String` via `resp.text().await` and then parsing it with `serde_js... | true | ||
Hmbown/CodeWhale | 2,799 | issue_to_patch | feat(tui): add Hugging Face env aliases | Harvests PR #2780 by @hongqitai for the v0.9 stewardship branch.
Credit
- PR author: @hongqitai
Changes
- Adds `HF_BASE_URL` as the short fallback alias for `HUGGINGFACE_BASE_URL` when the active provider is `huggingface`.
- Adds `HF_MODEL` as the short fallback alias for `HUGGINGFACE_MODEL` when the active provider ... | c3ec4b5df4d7f4a478f2b5d3b290c835031dff5e | 5926bf38a62f94d79fd94a785cf2b930beea254d | diff --git a/config.example.toml b/config.example.toml
index 35df687fd..e8ff484c3 100644
--- a/config.example.toml
+++ b/config.example.toml
@@ -248,7 +248,7 @@ max_subagents = 10 # optional (1-20)
# SGLang: SGLANG_BASE_URL, SGLANG_MODEL, optional SGLANG_API_KEY
# vLLM: VLLM_BASE_URL, VLLM_MODEL, optional... | [
"config.example.toml",
"crates/tui/src/config.rs",
"docs/CONFIGURATION.md"
] | [
{
"comment": "\n\nIf `HUGGINGFACE_BASE_URL` is set to an empty string in the environment, `or_else` will not be evaluated because `std::env::var` returns `Ok(\"\")`. This prevents falling back to `HF_BASE_URL`. Filtering out empty values befo... | true | ||
Hmbown/CodeWhale | 2,805 | issue_to_patch | Harvest deterministic response cache from #2501 | ## Summary
- harvest the safe response-cache slice from #2501 by @HUQIANTAO
- cache only explicit deterministic non-streaming, tool-free chat requests (`temperature: 0.0`, no tool choice, no stochastic `top_p`)
- key entries by provider, base URL, path suffix, API-key fingerprint, and final canonical wire body
- zero u... | f0827627a6c0455c6c2b2f002f330555537713d9 | 7fc074cc3660151d2c9994ab921cb880bb5f7844 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 94638d2da..ee8ccb367 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -62,6 +62,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
to Hugging Face's settings-generated MCP configuration and intentionally does
not include Hub search,... | [
"CHANGELOG.md",
"Cargo.lock",
"crates/tui/CHANGELOG.md",
"crates/tui/Cargo.toml",
"crates/tui/src/client/chat.rs",
"crates/tui/src/llm_response_cache.rs",
"crates/tui/src/main.rs"
] | [
{
"comment": "\n\nSince `parking_lot` is already a dependency of this crate, we can use `parking_lot::Mutex` instead of `std::sync::Mutex`. This avoids mutex poisoning handling (removing the need for `.ok()?` and `if let Ok(...)` checks) and ... | true | ||
Hmbown/CodeWhale | 2,806 | issue_to_patch | fix(tui): keep agent progress visible in sidebar | ## Summary
- fix the Agents sidebar detail row ordering that caused progress text to be truncated on narrow macOS CI snapshots
- keep active progress before branch/duration metadata while still verifying branch detail appears at wider widths
## Verification
- `cargo test -p codewhale-tui --locked --bin codewhale-tui a... | e03f2ab22509f9c6d2d7c1a8a6a42dd35ae7d457 | 19f5c7aa6ca4cb15e640b40333309c5abebe1a37 | diff --git a/crates/tui/src/tui/sidebar.rs b/crates/tui/src/tui/sidebar.rs
index 096170815..680b8ad30 100644
--- a/crates/tui/src/tui/sidebar.rs
+++ b/crates/tui/src/tui/sidebar.rs
@@ -1970,17 +1970,17 @@ pub fn subagent_panel_lines(
if row.steps_taken > 0 {
detail_parts.push(format!("{} step(s)",... | [
"crates/tui/src/tui/sidebar.rs"
] | [
{
"comment": "\n\nCalling `summarize_tool_output` on `progress` here is redundant and inefficient. In `sidebar_agent_rows`, any `agent.result` is already passed through `summarize_tool_output` before being stored in `row.progress`, and `app.a... | true | ||
Hmbown/CodeWhale | 2,798 | issue_to_patch | test(tui): satisfy all-targets clippy map_or lint | ## Summary
- replaces a test-only `map_or(true, ...)` assertion with `is_none_or(...)`
- unblocks the stricter all-targets clippy release-preflight path without changing runtime behavior
## Verification
- `cargo clippy -p codewhale-tui --locked --all-targets --all-features -- -D warnings`
- `cargo fmt --all -- --check... | b296f5fbdfb70e5b2d84d63680b9f6133637ff18 | f9d7ae7e20d705ef43d922e04c9cd095737e8c12 | diff --git a/crates/tui/src/tui/ui/tests.rs b/crates/tui/src/tui/ui/tests.rs
index b5ba6f09b..4eaacdc8c 100644
--- a/crates/tui/src/tui/ui/tests.rs
+++ b/crates/tui/src/tui/ui/tests.rs
@@ -7379,7 +7379,7 @@ async fn provider_switch_auth_error_restores_previous_provider_and_model() {
assert!(
app.status_me... | [
"crates/tui/src/tui/ui/tests.rs"
] | [] | true | ||
Hmbown/CodeWhale | 2,803 | issue_to_patch | Harvest pausable custom command MVP from #2732 | ## Summary
Harvests the narrow pausable custom slash-command MVP from #2732 by @aboimpinto without merging the broad PR as-is.
- Parse `pausable: true` frontmatter for custom slash commands.
- Add minimal app/engine pause state plus an engine pause gate before tool execution.
- Preserve paused command context across ... | 71cb2212e82bc98e98a0c18d23dda8369f925371 | 6b7a05ab1c274b6b3143839d2ff7f0c940e073c2 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 90611c2b0..b346d11aa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -66,6 +66,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
TUI sidebar from the command line instead of relying on copy-hostile sidebar
state during long transc... | [
"CHANGELOG.md",
"crates/tui/CHANGELOG.md",
"crates/tui/src/commands/user_commands.rs",
"crates/tui/src/core/engine.rs",
"crates/tui/src/core/engine/handle.rs",
"crates/tui/src/core/engine/turn_loop.rs",
"crates/tui/src/tui/app.rs",
"crates/tui/src/tui/composer_ui.rs",
"crates/tui/src/tui/ui.rs",
"... | [
{
"comment": "\n\nIf the `shared_paused` mutex is poisoned (e.g., due to a panic in another thread), `lock()` will return an `Err`. Using `is_ok_and` will silently evaluate to `false`, causing the engine to bypass the pause gate and continue ... | true | ||
Hmbown/CodeWhale | 2,801 | issue_to_patch | feat(cache): project mode prompts per request | Harvests PR #2687 by @LeoAlex0 for the v0.9.0 stewardship branch.
This keeps the stable system prompt mode-agnostic and projects mode, approval policy, and tool taxonomy as request-time user-role runtime metadata. That preserves stored history/prefix-cache bytes and avoids appending extra system messages for strict ch... | 125612575a3aaeb81c3a21456161716ad9bfc8ec | 1f9f860a3e8a8009dc05cbcc2bc5e5b17b9c8af0 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 929cdbd58..201e648b0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -91,6 +91,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Appended volatile `<turn_meta>` blocks after user text in outgoing user
message content arrays so pro... | [
"CHANGELOG.md",
"crates/tui/CHANGELOG.md",
"crates/tui/src/commands/debug.rs",
"crates/tui/src/core/engine.rs",
"crates/tui/src/core/engine/capacity_flow.rs",
"crates/tui/src/core/engine/tests.rs",
"crates/tui/src/core/engine/tool_catalog.rs",
"crates/tui/src/core/engine/turn_loop.rs",
"crates/tui/s... | [
{
"comment": "\n\nAppending the runtime prompt as a separate `user` message can result in consecutive `user` messages in the message list (e.g., when the last message in the session history is also a `user` message).\n\nStrict API providers (such... | true | ||
Hmbown/CodeWhale | 2,793 | issue_to_patch | test(config): isolate provider chain runtime resolution | ## Summary
- fix the Windows-only CI failure from #2762 after #2779
- guard the dormant provider fallback runtime-resolution test with the existing env mutex and EnvGuard
- keep the assertion unchanged: `fallback_providers` must not change the selected runtime provider
## Testing
- `cargo test -p codewhale-config --lo... | 1d50ed979673fb548c6da0d7108ee0999acb1e7a | 2e49b146559521e24ce6ab593d5758096f908aef | diff --git a/crates/config/src/lib.rs b/crates/config/src/lib.rs
index 46ce8e67e..de8f28e3d 100644
--- a/crates/config/src/lib.rs
+++ b/crates/config/src/lib.rs
@@ -5394,6 +5394,8 @@ fallback_providers = ["deepseek", "openrouter"]
#[test]
fn fallback_providers_do_not_change_runtime_resolution() {
+ l... | [
"crates/config/src/lib.rs"
] | [] | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.