From 083538ada8a98f3314db144d24fce465c3bd270c Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Tue, 23 Apr 2024 10:29:51 -0700 Subject: [PATCH] Some tests are failing, but nothing to worry about for now --- examples/tests.modal | 46 +++++++++++++++++--------------------------- 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/examples/tests.modal b/examples/tests.modal index 67dee5a..bceb0cb 100644 --- a/examples/tests.modal +++ b/examples/tests.modal @@ -9,11 +9,6 @@ ( a b c ) = (a b c) test (a b c ( a b c ) ) = (a b c (a b c)) test -(ab cd () ghost) = (ab cd ()) test -(ab cd ghost ()) = (ab cd ()) test -(ab ghost cd ()) = (ab cd ()) test -(ghost ab cd ()) = (ab cd ()) test - ?(?-) (Inline rules) <> ((?x -> ?y)) (<> ?x ?y) @@ -23,16 +18,21 @@ nap tap test ?(?-) (Empty replacements) -<> (?x rightless/pop) -<> (?x pop) () -<> (prefix/pop ?x) (ok) -<> (?x suffix/pop) (ok) +(ab cd () ghost) = (ab cd ()) test +(ab cd ghost ()) = (ab cd ()) test +(ab ghost cd ()) = (ab cd ()) test +(ghost ab cd ()) = (ab cd ()) test +(ghost) = () test + +(q ?((?x ?y ?z) (?x ?y)) a b c) = (q a b) test +(q ?((?x ?y ?z) (?x ?z)) a b c) = (q a c) test +(q ?((?x ?y ?z) (?y ?z)) a b c) = (q b c) test + +<> (prefix/pop ?x) () +<> (?x suffix/pop) () -(abc rightless/pop) = () test (prefix/pop foo) = (ok) test (foo suffix/pop) = (ok) test -(abc def pop) = (abc) test -(ghost) = () test ?(?-) (Basic replacements) @@ -66,30 +66,20 @@ replace-empty abc = ?y test connect foo bar baz = foo-barbaz test prefix-anything = anything-suffix test -?(?-) (Guards setups) - -<> (join (String ?x) (String ?y)) ((?x ?y) =) - -join (String abc) (String def) (abc def) test - ?(?-) (Lambdas) -?((?x) ((?x ?x) =)) abc (abc abc) test +?(?x (?x ?x)) abc = (abc abc) test abc ?(?x) def = abc test ?(?-) (Explode) -<> (explode ?*) ((?*) =) +?(?* ?*) cow = (c (o (w ()))) test +?(?* ?*) (12 34 45) = (12 (34 (45 ()))) test -explode cow (c (o (w ()))) test -explode (12 34 45) (12 (34 (45 ()))) test +?(?-) (op: join) -?(?-) (Implode) - -<> (implode ?^) (?^ =) - -implode (b (a (t ()))) bat test -implode (12 (34 (56 ()))) 123456 test +?(?^ ?^) (b (a (t ()))) = bat test +?(?^ ?^) (12 (34 (56 ()))) = 123456 test ?(?-) (Test Primitives)