From ab83ab31b52894fed1488ff83a9cdc445411f467 Mon Sep 17 00:00:00 2001 From: Lukasz Czajka Date: Tue, 22 Oct 2024 17:47:24 +0200 Subject: [PATCH 1/6] update stdlib --- juvix-stdlib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/juvix-stdlib b/juvix-stdlib index e164aa1450..5c44bff39e 160000 --- a/juvix-stdlib +++ b/juvix-stdlib @@ -1 +1 @@ -Subproject commit e164aa14503ff11dbcf0dc96bcd4cfa4d757b76d +Subproject commit 5c44bff39e1f4b19d89fe79bda12513abc805603 From e4e5781ed669bc257c5c50976b68dd31d94c27e6 Mon Sep 17 00:00:00 2001 From: Lukasz Czajka Date: Tue, 22 Oct 2024 18:22:21 +0200 Subject: [PATCH 2/6] fix tests --- examples/milestone/TicTacToe/Logic/GameState.juvix | 2 +- tests/Anoma/Compilation/positive/test007.juvix | 6 +++--- tests/Casm/Compilation/positive/test007.juvix | 4 ++-- tests/Compilation/positive/test007.juvix | 6 +++--- tests/Rust/Compilation/positive/test007.juvix | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/milestone/TicTacToe/Logic/GameState.juvix b/examples/milestone/TicTacToe/Logic/GameState.juvix index 2547010256..6ec4c3b9f6 100644 --- a/examples/milestone/TicTacToe/Logic/GameState.juvix +++ b/examples/milestone/TicTacToe/Logic/GameState.juvix @@ -44,4 +44,4 @@ won (state : GameState) : Bool := draw (state : GameState) : Bool := let squares := Board.squares (GameState.board state); - in null (possibleMoves (flatten squares)); + in isEmpty (possibleMoves (flatten squares)); diff --git a/tests/Anoma/Compilation/positive/test007.juvix b/tests/Anoma/Compilation/positive/test007.juvix index 6c68d86ecf..622b88deb6 100644 --- a/tests/Anoma/Compilation/positive/test007.juvix +++ b/tests/Anoma/Compilation/positive/test007.juvix @@ -14,13 +14,13 @@ map' {A B} (f : A → B) : List A → List B := -- TODO: Restore when anoma backend supports strings -- terminating -- map'' {A B} {{Partial}} (f : A → B) (x : List A) : List B := --- if (null x) nil (f (phead x) :: map'' f (tail x)); +-- if (isEmpty x) nil (f (phead x) :: map'' f (tail x)); lst : List Nat := 0 :: 1 :: nil; main : List Nat := - trace (null lst) - >-> trace (null (nil {Nat})) + trace (isEmpty lst) + >-> trace (isEmpty (nil {Nat})) >-> trace (head 1 lst) >-> trace (tail lst) >-> trace (head 0 (tail lst)) diff --git a/tests/Casm/Compilation/positive/test007.juvix b/tests/Casm/Compilation/positive/test007.juvix index b2c114dec7..4b1cbfdbc4 100644 --- a/tests/Casm/Compilation/positive/test007.juvix +++ b/tests/Casm/Compilation/positive/test007.juvix @@ -12,8 +12,8 @@ map' {A B} (f : A → B) : List A → List B := lst : List Nat := 0 :: 1 :: nil; main : Nat := - ite (null lst) 1 0 - + ite (null (nil {Nat})) 1 0 + ite (isEmpty lst) 1 0 + + ite (isEmpty (nil {Nat})) 1 0 + head 1 lst + head 0 (tail lst) + head 0 (tail (map ((+) 1) lst)) diff --git a/tests/Compilation/positive/test007.juvix b/tests/Compilation/positive/test007.juvix index 054198abb3..844209d5af 100644 --- a/tests/Compilation/positive/test007.juvix +++ b/tests/Compilation/positive/test007.juvix @@ -11,7 +11,7 @@ map' {A B} (f : A → B) : List A → List B := terminating map'' {A B} {{Partial}} (f : A → B) (x : List A) : List B := - ite (null x) nil (f (phead x) :: map'' f (tail x)); + ite (isEmpty x) nil (f (phead x) :: map'' f (tail x)); lst : List Nat := 0 :: 1 :: nil; @@ -24,8 +24,8 @@ printNatListLn (lst : List Nat) : IO := printNatList lst >>> printString "\n"; main : IO := - printBoolLn (null lst) - >>> printBoolLn (null (nil {Nat})) + printBoolLn (isEmpty lst) + >>> printBoolLn (isEmpty (nil {Nat})) >>> printNatLn (head 1 lst) >>> printNatListLn (tail lst) >>> printNatLn (head 0 (tail lst)) diff --git a/tests/Rust/Compilation/positive/test007.juvix b/tests/Rust/Compilation/positive/test007.juvix index b2c114dec7..4b1cbfdbc4 100644 --- a/tests/Rust/Compilation/positive/test007.juvix +++ b/tests/Rust/Compilation/positive/test007.juvix @@ -12,8 +12,8 @@ map' {A B} (f : A → B) : List A → List B := lst : List Nat := 0 :: 1 :: nil; main : Nat := - ite (null lst) 1 0 - + ite (null (nil {Nat})) 1 0 + ite (isEmpty lst) 1 0 + + ite (isEmpty (nil {Nat})) 1 0 + head 1 lst + head 0 (tail lst) + head 0 (tail (map ((+) 1) lst)) From 66167577945cb790c53759b4895bc56a28b017e2 Mon Sep 17 00:00:00 2001 From: Lukasz Czajka Date: Tue, 22 Oct 2024 18:24:02 +0200 Subject: [PATCH 3/6] update stdlib --- juvix-stdlib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/juvix-stdlib b/juvix-stdlib index 5c44bff39e..253d348a85 160000 --- a/juvix-stdlib +++ b/juvix-stdlib @@ -1 +1 @@ -Subproject commit 5c44bff39e1f4b19d89fe79bda12513abc805603 +Subproject commit 253d348a85661208206b339c494b4c4835dbeeaf From 25eacf717bc644ee772953e0eb7dd6ae0062ede7 Mon Sep 17 00:00:00 2001 From: Lukasz Czajka Date: Tue, 22 Oct 2024 18:25:46 +0200 Subject: [PATCH 4/6] update stdlib --- juvix-stdlib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/juvix-stdlib b/juvix-stdlib index 253d348a85..194e8a2d23 160000 --- a/juvix-stdlib +++ b/juvix-stdlib @@ -1 +1 @@ -Subproject commit 253d348a85661208206b339c494b4c4835dbeeaf +Subproject commit 194e8a2d236d80f8bc2032f5ea472bef15846ec9 From 3aa9eaaa6b126d2c29e84ed8c2137f5c14e3f52c Mon Sep 17 00:00:00 2001 From: Lukasz Czajka Date: Wed, 23 Oct 2024 10:17:34 +0200 Subject: [PATCH 5/6] fix smoke tests --- tests/smoke/Commands/dev/repl.smoke.yaml | 4 ++-- tests/smoke/Commands/repl.smoke.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/smoke/Commands/dev/repl.smoke.yaml b/tests/smoke/Commands/dev/repl.smoke.yaml index 6dec6075e2..f3522de189 100644 --- a/tests/smoke/Commands/dev/repl.smoke.yaml +++ b/tests/smoke/Commands/dev/repl.smoke.yaml @@ -68,14 +68,14 @@ tests: Stdlib.Prelude> \1 exit-status: 0 - - name: check-type-null + - name: check-type-isEmpty command: - juvix - dev - repl stdout: contains: "{A : Type} -> (list : List A) -> Bool" - stdin: ":type null" + stdin: ":type isEmpty" exit-status: 0 - name: check-type-suc diff --git a/tests/smoke/Commands/repl.smoke.yaml b/tests/smoke/Commands/repl.smoke.yaml index 014d019ee5..7afe2d5afb 100644 --- a/tests/smoke/Commands/repl.smoke.yaml +++ b/tests/smoke/Commands/repl.smoke.yaml @@ -151,13 +151,13 @@ tests: Stdlib.Prelude> \1 exit-status: 0 - - name: check-type-null + - name: check-type-isEmpty command: - juvix - repl stdout: contains: "{A : Type} -> (list : List A) -> Bool" - stdin: ":type null" + stdin: ":type isEmpty" exit-status: 0 - name: check-type-suc From 203e7cdd325772cca8657e7948f915b0331e63ad Mon Sep 17 00:00:00 2001 From: Paul Cadman Date: Thu, 24 Oct 2024 11:17:19 +0100 Subject: [PATCH 6/6] Update stdlib submodule reference to main --- juvix-stdlib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/juvix-stdlib b/juvix-stdlib index 194e8a2d23..7c7162aca5 160000 --- a/juvix-stdlib +++ b/juvix-stdlib @@ -1 +1 @@ -Subproject commit 194e8a2d236d80f8bc2032f5ea472bef15846ec9 +Subproject commit 7c7162aca573d116825857da272d83d0fc8afcf7