summaryrefslogtreecommitdiff
path: root/tests/lean/Constants.lean
diff options
context:
space:
mode:
authorSon Ho2023-07-05 14:52:23 +0200
committerSon Ho2023-07-05 14:52:23 +0200
commit0a0445c72e005c328b4764f5fb0f8f38e7a55d60 (patch)
tree43fb9284e8c02ec5ed8b8a5d59f6569d66b900ff /tests/lean/Constants.lean
parent442caaf62e4a217b9a10116c4e529c49f83c4efd (diff)
Start using namespaces in the Lean backend
Diffstat (limited to '')
-rw-r--r--tests/lean/Constants.lean9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/lean/Constants.lean b/tests/lean/Constants.lean
index 9f6a47de..39c270be 100644
--- a/tests/lean/Constants.lean
+++ b/tests/lean/Constants.lean
@@ -2,8 +2,7 @@
-- [constants]
import Base
open Primitives
-
-namespace Constants
+namespace constants
/- [constants::X0] -/
def x0_body : Result U32 := Result.ret (U32.ofInt 0 (by intlit))
@@ -69,11 +68,11 @@ structure wrap_t (T : Type) where
wrap_val : T
/- [constants::Wrap::{0}::new] -/
-def wrap_new_fwd (T : Type) (val : T) : Result (wrap_t T) :=
+def Wrap.new_fwd (T : Type) (val : T) : Result (wrap_t T) :=
Result.ret { wrap_val := val }
/- [constants::Y] -/
-def y_body : Result (wrap_t I32) := wrap_new_fwd I32 (I32.ofInt 2 (by intlit))
+def y_body : Result (wrap_t I32) := Wrap.new_fwd I32 (I32.ofInt 2 (by intlit))
def y_c : wrap_t I32 := eval_global y_body (by simp)
/- [constants::unwrap_y] -/
@@ -132,4 +131,4 @@ def s4_body : Result (pair_t U32 U32) :=
mk_pair1_fwd (U32.ofInt 7 (by intlit)) (U32.ofInt 8 (by intlit))
def s4_c : pair_t U32 U32 := eval_global s4_body (by simp)
-end Constants
+end constants