mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-09-11 11:56:54 +03:00
Update tests to use .bend extension, fix test uite
This commit is contained in:
parent
a0c1ea4bd5
commit
e1dd23d96c
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
/target
|
/target
|
||||||
*.snap.new
|
*.snap.new
|
||||||
|
.out.hvm
|
@ -1,7 +1,5 @@
|
|||||||
# Bend
|
# Bend
|
||||||
|
|
||||||
_Note: The latest version of Bend targets an unreleased version of HVM. If you want to use Bend right now, use branch [hvm-core](https://github.com/HigherOrderCO/bend/tree/hvm-core)_.
|
|
||||||
|
|
||||||
Bend is a programming language that can run massively parallel programs on the GPU or the CPU using the power of interaction nets and the [HVM](https://github.com/HigherOrderCO/hvm).
|
Bend is a programming language that can run massively parallel programs on the GPU or the CPU using the power of interaction nets and the [HVM](https://github.com/HigherOrderCO/hvm).
|
||||||
With Bend, you can write programs for the GPU as easily as you'd write a normal program in your favorite language.
|
With Bend, you can write programs for the GPU as easily as you'd write a normal program in your favorite language.
|
||||||
|
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
data Tree = (node ~lft ~rgt) | (leaf val)
|
|
||||||
|
|
||||||
(MergeSort tree) = fold tree {
|
|
||||||
Tree/node: (merge tree.lft tree.rgt)
|
|
||||||
Tree/leaf: tree
|
|
||||||
}
|
|
||||||
|
|
||||||
(Merge (Tree/leaf a) (Tree/leaf b)) =
|
|
||||||
let (a, b) = if (<= a b) { (a, b) } else { (b, a) }
|
|
||||||
(Tree/node (Tree/leaf a) (Tree/leaf b))
|
|
||||||
|
|
||||||
|
|
||||||
(concat a b) = match a {
|
|
||||||
List/cons:
|
|
||||||
}
|
|
@ -69,7 +69,7 @@ fn run_golden_test_dir_multiple(test_name: &str, run: &[&RunFn]) {
|
|||||||
|
|
||||||
let walker = WalkDir::new(&root).sort_by_file_name().max_depth(2).into_iter().filter_entry(|e| {
|
let walker = WalkDir::new(&root).sort_by_file_name().max_depth(2).into_iter().filter_entry(|e| {
|
||||||
let path = e.path();
|
let path = e.path();
|
||||||
path == root || path.is_dir() || (path.is_file() && path.extension().is_some_and(|x| x == "hvm"))
|
path == root || path.is_dir() || (path.is_file() && path.extension().is_some_and(|x| x == "bend"))
|
||||||
});
|
});
|
||||||
|
|
||||||
for entry in walker {
|
for entry in walker {
|
||||||
@ -407,7 +407,7 @@ fn examples() -> Result<(), Diagnostics> {
|
|||||||
.min_depth(1)
|
.min_depth(1)
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter_map(|e| e.ok())
|
.filter_map(|e| e.ok())
|
||||||
.filter(|e| e.path().extension().map_or(false, |ext| ext == "hvm"))
|
.filter(|e| e.path().extension().map_or(false, |ext| ext == "bend"))
|
||||||
{
|
{
|
||||||
let _guard = RUN_MUTEX.lock().unwrap();
|
let _guard = RUN_MUTEX.lock().unwrap();
|
||||||
let path = entry.path();
|
let path = entry.path();
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
gen-hvm
|
gen-hvm
|
||||||
tests/golden_tests/cli/compile_all.hvm
|
tests/golden_tests/cli/compile_all.bend
|
||||||
-Oall
|
-Oall
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
gen-hvm
|
gen-hvm
|
||||||
tests/golden_tests/cli/compile_inline.hvm
|
tests/golden_tests/cli/compile_inline.bend
|
||||||
-Oinline
|
-Oinline
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
gen-hvm
|
gen-hvm
|
||||||
tests/golden_tests/cli/compile_no_opts.hvm
|
tests/golden_tests/cli/compile_no_opts.bend
|
||||||
-Ono-all
|
-Ono-all
|
||||||
-Ono-eta
|
-Ono-eta
|
||||||
-Ono-prune
|
-Ono-prune
|
||||||
-Ono-pre-reduce
|
|
||||||
-Ono-float-combinators
|
-Ono-float-combinators
|
||||||
-Ono-merge
|
-Ono-merge
|
||||||
-Ono-inline
|
-Ono-inline
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
gen-hvm
|
gen-hvm
|
||||||
tests/golden_tests/cli/compile_pre_reduce.hvm
|
tests/golden_tests/cli/compile_pre_reduce.bend
|
||||||
-Opre-reduce
|
-Opre-reduce
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
gen-hvm
|
gen-hvm
|
||||||
tests/golden_tests/cli/compile_strict_loop.hvm
|
tests/golden_tests/cli/compile_strict_loop.bend
|
||||||
-Ono-all
|
-Ono-all
|
||||||
-Arecursion-cycle
|
-Arecursion-cycle
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
gen-hvm
|
gen-hvm
|
||||||
tests/golden_tests/cli/compile_wrong_opt.hvm
|
tests/golden_tests/cli/compile_wrong_opt.bend
|
||||||
-Ofoo
|
-Ofoo
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
run
|
run
|
||||||
tests/golden_tests/cli/debug_list_map.hvm
|
tests/golden_tests/cli/debug_list_map.bend
|
||||||
-d
|
-d
|
||||||
-L
|
-L
|
||||||
-1
|
-1
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
run
|
run
|
||||||
tests/golden_tests/cli/debug_u60_to_nat.hvm
|
tests/golden_tests/cli/debug_u60_to_nat.bend
|
||||||
-d
|
-d
|
||||||
4
|
4
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
desugar
|
desugar
|
||||||
tests/golden_tests/cli/desugar_bool_scott.hvm
|
tests/golden_tests/cli/desugar_bool_scott.bend
|
||||||
-Oadt-scott
|
-Oadt-scott
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
desugar
|
|
||||||
tests/golden_tests/cli/desugar_bool_tagged.hvm
|
|
||||||
-Oadt-tagged-scott
|
|
@ -1,3 +0,0 @@
|
|||||||
data Boolean = True | False
|
|
||||||
|
|
||||||
main = Boolean/True
|
|
@ -1,3 +1,3 @@
|
|||||||
desugar
|
desugar
|
||||||
tests/golden_tests/cli/desugar_float_combinators.hvm
|
tests/golden_tests/cli/desugar_float_combinators.bend
|
||||||
-Ofloat-combinators
|
-Ofloat-combinators
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
desugar
|
desugar
|
||||||
tests/golden_tests/cli/desugar_linearize_matches.hvm
|
tests/golden_tests/cli/desugar_linearize_matches.bend
|
||||||
-Olinearize-matches
|
-Olinearize-matches
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
desugar
|
desugar
|
||||||
tests/golden_tests/cli/desugar_linearize_matches_alt.hvm
|
tests/golden_tests/cli/desugar_linearize_matches_alt.bend
|
||||||
-Olinearize-matches-alt
|
-Olinearize-matches-alt
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
desugar
|
desugar
|
||||||
tests/golden_tests/cli/desugar_merge.hvm
|
tests/golden_tests/cli/desugar_merge.bend
|
||||||
-Omerge
|
-Omerge
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
desugar
|
desugar
|
||||||
tests/golden_tests/cli/desugar_prune.hvm
|
tests/golden_tests/cli/desugar_prune.bend
|
||||||
-Oprune
|
-Oprune
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
run
|
run
|
||||||
tests/golden_tests/cli/run_add.hvm
|
tests/golden_tests/cli/run_add.bend
|
||||||
3
|
3
|
||||||
6
|
6
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
run
|
run
|
||||||
tests/golden_tests/cli/run_pretty.hvm
|
tests/golden_tests/cli/run_pretty.bend
|
||||||
-p
|
-p
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
gen-hvm
|
gen-hvm
|
||||||
tests/golden_tests/cli/warn_and_err.hvm
|
tests/golden_tests/cli/warn_and_err.bend
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user