diff options
Diffstat (limited to 'tests/lean')
-rw-r--r-- | tests/lean/Arrays.lean | 4 | ||||
-rw-r--r-- | tests/lean/Constants.lean | 80 | ||||
-rw-r--r-- | tests/lean/Demo/Demo.lean | 10 | ||||
-rw-r--r-- | tests/lean/NoNestedBorrows.lean | 8 | ||||
-rw-r--r-- | tests/lean/Traits.lean | 168 |
5 files changed, 135 insertions, 135 deletions
diff --git a/tests/lean/Arrays.lean b/tests/lean/Arrays.lean index 59458393..d637ee13 100644 --- a/tests/lean/Arrays.lean +++ b/tests/lean/Arrays.lean @@ -451,8 +451,8 @@ def f3 : Result U32 := /- [arrays::SZ] Source: 'src/arrays.rs', lines 286:0-286:19 -/ -def sz_body : Result Usize := Result.ret 32#usize -def sz_c : Usize := eval_global sz_body +def SZ_body : Result Usize := Result.ret 32#usize +def SZ : Usize := eval_global SZ_body /- [arrays::f5]: Source: 'src/arrays.rs', lines 289:0-289:31 -/ diff --git a/tests/lean/Constants.lean b/tests/lean/Constants.lean index 32e0317b..7949a25c 100644 --- a/tests/lean/Constants.lean +++ b/tests/lean/Constants.lean @@ -7,18 +7,18 @@ namespace constants /- [constants::X0] Source: 'src/constants.rs', lines 5:0-5:17 -/ -def x0_body : Result U32 := Result.ret 0#u32 -def x0_c : U32 := eval_global x0_body +def X0_body : Result U32 := Result.ret 0#u32 +def X0 : U32 := eval_global X0_body /- [constants::X1] Source: 'src/constants.rs', lines 7:0-7:17 -/ -def x1_body : Result U32 := Result.ret core_u32_max -def x1_c : U32 := eval_global x1_body +def X1_body : Result U32 := Result.ret core_u32_max +def X1 : U32 := eval_global X1_body /- [constants::X2] Source: 'src/constants.rs', lines 10:0-10:17 -/ -def x2_body : Result U32 := Result.ret 3#u32 -def x2_c : U32 := eval_global x2_body +def X2_body : Result U32 := Result.ret 3#u32 +def X2 : U32 := eval_global X2_body /- [constants::incr]: Source: 'src/constants.rs', lines 17:0-17:32 -/ @@ -27,8 +27,8 @@ def incr (n : U32) : Result U32 := /- [constants::X3] Source: 'src/constants.rs', lines 15:0-15:17 -/ -def x3_body : Result U32 := incr 32#u32 -def x3_c : U32 := eval_global x3_body +def X3_body : Result U32 := incr 32#u32 +def X3 : U32 := eval_global X3_body /- [constants::mk_pair0]: Source: 'src/constants.rs', lines 23:0-23:51 -/ @@ -48,23 +48,23 @@ def mk_pair1 (x : U32) (y : U32) : Result (Pair U32 U32) := /- [constants::P0] Source: 'src/constants.rs', lines 31:0-31:24 -/ -def p0_body : Result (U32 × U32) := mk_pair0 0#u32 1#u32 -def p0_c : (U32 × U32) := eval_global p0_body +def P0_body : Result (U32 × U32) := mk_pair0 0#u32 1#u32 +def P0 : (U32 × U32) := eval_global P0_body /- [constants::P1] Source: 'src/constants.rs', lines 32:0-32:28 -/ -def p1_body : Result (Pair U32 U32) := mk_pair1 0#u32 1#u32 -def p1_c : Pair U32 U32 := eval_global p1_body +def P1_body : Result (Pair U32 U32) := mk_pair1 0#u32 1#u32 +def P1 : Pair U32 U32 := eval_global P1_body /- [constants::P2] Source: 'src/constants.rs', lines 33:0-33:24 -/ -def p2_body : Result (U32 × U32) := Result.ret (0#u32, 1#u32) -def p2_c : (U32 × U32) := eval_global p2_body +def P2_body : Result (U32 × U32) := Result.ret (0#u32, 1#u32) +def P2 : (U32 × U32) := eval_global P2_body /- [constants::P3] Source: 'src/constants.rs', lines 34:0-34:28 -/ -def p3_body : Result (Pair U32 U32) := Result.ret { x := 0#u32, y := 1#u32 } -def p3_c : Pair U32 U32 := eval_global p3_body +def P3_body : Result (Pair U32 U32) := Result.ret { x := 0#u32, y := 1#u32 } +def P3 : Pair U32 U32 := eval_global P3_body /- [constants::Wrap] Source: 'src/constants.rs', lines 49:0-49:18 -/ @@ -78,28 +78,28 @@ def Wrap.new (T : Type) (value : T) : Result (Wrap T) := /- [constants::Y] Source: 'src/constants.rs', lines 41:0-41:22 -/ -def y_body : Result (Wrap I32) := Wrap.new I32 2#i32 -def y_c : Wrap I32 := eval_global y_body +def Y_body : Result (Wrap I32) := Wrap.new I32 2#i32 +def Y : Wrap I32 := eval_global Y_body /- [constants::unwrap_y]: Source: 'src/constants.rs', lines 43:0-43:30 -/ def unwrap_y : Result I32 := - Result.ret y_c.value + Result.ret Y.value /- [constants::YVAL] Source: 'src/constants.rs', lines 47:0-47:19 -/ -def yval_body : Result I32 := unwrap_y -def yval_c : I32 := eval_global yval_body +def YVAL_body : Result I32 := unwrap_y +def YVAL : I32 := eval_global YVAL_body /- [constants::get_z1::Z1] Source: 'src/constants.rs', lines 62:4-62:17 -/ -def get_z1_z1_body : Result I32 := Result.ret 3#i32 -def get_z1_z1_c : I32 := eval_global get_z1_z1_body +def get_z1.Z1_body : Result I32 := Result.ret 3#i32 +def get_z1.Z1 : I32 := eval_global get_z1.Z1_body /- [constants::get_z1]: Source: 'src/constants.rs', lines 61:0-61:28 -/ def get_z1 : Result I32 := - Result.ret get_z1_z1_c + Result.ret get_z1.Z1 /- [constants::add]: Source: 'src/constants.rs', lines 66:0-66:39 -/ @@ -108,45 +108,45 @@ def add (a : I32) (b : I32) : Result I32 := /- [constants::Q1] Source: 'src/constants.rs', lines 74:0-74:17 -/ -def q1_body : Result I32 := Result.ret 5#i32 -def q1_c : I32 := eval_global q1_body +def Q1_body : Result I32 := Result.ret 5#i32 +def Q1 : I32 := eval_global Q1_body /- [constants::Q2] Source: 'src/constants.rs', lines 75:0-75:17 -/ -def q2_body : Result I32 := Result.ret q1_c -def q2_c : I32 := eval_global q2_body +def Q2_body : Result I32 := Result.ret Q1 +def Q2 : I32 := eval_global Q2_body /- [constants::Q3] Source: 'src/constants.rs', lines 76:0-76:17 -/ -def q3_body : Result I32 := add q2_c 3#i32 -def q3_c : I32 := eval_global q3_body +def Q3_body : Result I32 := add Q2 3#i32 +def Q3 : I32 := eval_global Q3_body /- [constants::get_z2]: Source: 'src/constants.rs', lines 70:0-70:28 -/ def get_z2 : Result I32 := do let i ← get_z1 - let i1 ← add i q3_c - add q1_c i1 + let i1 ← add i Q3 + add Q1 i1 /- [constants::S1] Source: 'src/constants.rs', lines 80:0-80:18 -/ -def s1_body : Result U32 := Result.ret 6#u32 -def s1_c : U32 := eval_global s1_body +def S1_body : Result U32 := Result.ret 6#u32 +def S1 : U32 := eval_global S1_body /- [constants::S2] Source: 'src/constants.rs', lines 81:0-81:18 -/ -def s2_body : Result U32 := incr s1_c -def s2_c : U32 := eval_global s2_body +def S2_body : Result U32 := incr S1 +def S2 : U32 := eval_global S2_body /- [constants::S3] Source: 'src/constants.rs', lines 82:0-82:29 -/ -def s3_body : Result (Pair U32 U32) := Result.ret p3_c -def s3_c : Pair U32 U32 := eval_global s3_body +def S3_body : Result (Pair U32 U32) := Result.ret P3 +def S3 : Pair U32 U32 := eval_global S3_body /- [constants::S4] Source: 'src/constants.rs', lines 83:0-83:29 -/ -def s4_body : Result (Pair U32 U32) := mk_pair1 7#u32 8#u32 -def s4_c : Pair U32 U32 := eval_global s4_body +def S4_body : Result (Pair U32 U32) := mk_pair1 7#u32 8#u32 +def S4 : Pair U32 U32 := eval_global S4_body end constants diff --git a/tests/lean/Demo/Demo.lean b/tests/lean/Demo/Demo.lean index 01818585..b6a4a797 100644 --- a/tests/lean/Demo/Demo.lean +++ b/tests/lean/Demo/Demo.lean @@ -126,17 +126,17 @@ divergent def i32_id (i : I32) : Result I32 := structure Counter (Self : Type) where incr : Self → Result (Usize × Self) -/- [demo::{usize}::incr]: +/- [demo::{(demo::Counter for usize)}::incr]: Source: 'src/demo.rs', lines 88:4-88:31 -/ -def Usize.incr (self : Usize) : Result (Usize × Usize) := +def CounterUsize.incr (self : Usize) : Result (Usize × Usize) := do let self1 ← self + 1#usize Result.ret (self, self1) -/- Trait implementation: [demo::{usize}] +/- Trait implementation: [demo::{(demo::Counter for usize)}] Source: 'src/demo.rs', lines 87:0-87:22 -/ -def demo.CounterUsizeInst : Counter Usize := { - incr := Usize.incr +def CounterUsize : Counter Usize := { + incr := CounterUsize.incr } /- [demo::use_counter]: diff --git a/tests/lean/NoNestedBorrows.lean b/tests/lean/NoNestedBorrows.lean index a85209ea..2112e282 100644 --- a/tests/lean/NoNestedBorrows.lean +++ b/tests/lean/NoNestedBorrows.lean @@ -138,13 +138,13 @@ def mix_arith_i32 (x : I32) (y : I32) (z : I32) : Result I32 := /- [no_nested_borrows::CONST0] Source: 'src/no_nested_borrows.rs', lines 125:0-125:23 -/ -def const0_body : Result Usize := 1#usize + 1#usize -def const0_c : Usize := eval_global const0_body +def CONST0_body : Result Usize := 1#usize + 1#usize +def CONST0 : Usize := eval_global CONST0_body /- [no_nested_borrows::CONST1] Source: 'src/no_nested_borrows.rs', lines 126:0-126:23 -/ -def const1_body : Result Usize := 2#usize * 2#usize -def const1_c : Usize := eval_global const1_body +def CONST1_body : Result Usize := 2#usize * 2#usize +def CONST1 : Usize := eval_global CONST1_body /- [no_nested_borrows::cast_u32_to_i32]: Source: 'src/no_nested_borrows.rs', lines 128:0-128:37 -/ diff --git a/tests/lean/Traits.lean b/tests/lean/Traits.lean index f83fbc2f..d74a4dbe 100644 --- a/tests/lean/Traits.lean +++ b/tests/lean/Traits.lean @@ -10,15 +10,15 @@ namespace traits structure BoolTrait (Self : Type) where get_bool : Self → Result Bool -/- [traits::{bool}::get_bool]: +/- [traits::{(traits::BoolTrait for bool)}::get_bool]: Source: 'src/traits.rs', lines 12:4-12:30 -/ -def Bool.get_bool (self : Bool) : Result Bool := +def BoolTraitBool.get_bool (self : Bool) : Result Bool := Result.ret self -/- Trait implementation: [traits::{bool}] +/- Trait implementation: [traits::{(traits::BoolTrait for bool)}] Source: 'src/traits.rs', lines 11:0-11:23 -/ -def traits.BoolTraitBoolInst : BoolTrait Bool := { - get_bool := Bool.get_bool +def BoolTraitBool : BoolTrait Bool := { + get_bool := BoolTraitBool.get_bool } /- [traits::BoolTrait::ret_true]: @@ -31,32 +31,32 @@ def BoolTrait.ret_true Source: 'src/traits.rs', lines 17:0-17:44 -/ def test_bool_trait_bool (x : Bool) : Result Bool := do - let b ← Bool.get_bool x + let b ← BoolTraitBool.get_bool x if b - then BoolTrait.ret_true traits.BoolTraitBoolInst x + then BoolTrait.ret_true BoolTraitBool x else Result.ret false -/- [traits::{core::option::Option<T>#1}::get_bool]: +/- [traits::{(traits::BoolTrait for core::option::Option<T>)#1}::get_bool]: Source: 'src/traits.rs', lines 23:4-23:30 -/ -def Option.get_bool (T : Type) (self : Option T) : Result Bool := +def BoolTraitcoreoptionOptionT.get_bool + (T : Type) (self : Option T) : Result Bool := match self with | none => Result.ret false | some _ => Result.ret true -/- Trait implementation: [traits::{core::option::Option<T>#1}] +/- Trait implementation: [traits::{(traits::BoolTrait for core::option::Option<T>)#1}] Source: 'src/traits.rs', lines 22:0-22:31 -/ -def traits.BoolTraitcoreoptionOptionTInst (T : Type) : BoolTrait (Option T) - := { - get_bool := Option.get_bool T +def BoolTraitcoreoptionOptionT (T : Type) : BoolTrait (Option T) := { + get_bool := BoolTraitcoreoptionOptionT.get_bool T } /- [traits::test_bool_trait_option]: Source: 'src/traits.rs', lines 31:0-31:54 -/ def test_bool_trait_option (T : Type) (x : Option T) : Result Bool := do - let b ← Option.get_bool T x + let b ← BoolTraitcoreoptionOptionT.get_bool T x if b - then BoolTrait.ret_true (traits.BoolTraitcoreoptionOptionTInst T) x + then BoolTrait.ret_true (BoolTraitcoreoptionOptionT T) x else Result.ret false /- [traits::test_bool_trait]: @@ -70,20 +70,20 @@ def test_bool_trait structure ToU64 (Self : Type) where to_u64 : Self → Result U64 -/- [traits::{u64#2}::to_u64]: +/- [traits::{(traits::ToU64 for u64)#2}::to_u64]: Source: 'src/traits.rs', lines 44:4-44:26 -/ -def U64.to_u64 (self : U64) : Result U64 := +def ToU64U64.to_u64 (self : U64) : Result U64 := Result.ret self -/- Trait implementation: [traits::{u64#2}] +/- Trait implementation: [traits::{(traits::ToU64 for u64)#2}] Source: 'src/traits.rs', lines 43:0-43:18 -/ -def traits.ToU64U64Inst : ToU64 U64 := { - to_u64 := U64.to_u64 +def ToU64U64 : ToU64 U64 := { + to_u64 := ToU64U64.to_u64 } -/- [traits::{(A, A)#3}::to_u64]: +/- [traits::{(traits::ToU64 for (A, A))#3}::to_u64]: Source: 'src/traits.rs', lines 50:4-50:26 -/ -def Pair.to_u64 +def ToU64Pair.to_u64 (A : Type) (ToU64AInst : ToU64 A) (self : (A × A)) : Result U64 := do let (t, t1) := self @@ -91,71 +91,70 @@ def Pair.to_u64 let i1 ← ToU64AInst.to_u64 t1 i + i1 -/- Trait implementation: [traits::{(A, A)#3}] +/- Trait implementation: [traits::{(traits::ToU64 for (A, A))#3}] Source: 'src/traits.rs', lines 49:0-49:31 -/ -def traits.ToU64TupleAAInst (A : Type) (ToU64AInst : ToU64 A) : ToU64 (A × A) - := { - to_u64 := Pair.to_u64 A ToU64AInst +def ToU64Pair (A : Type) (ToU64AInst : ToU64 A) : ToU64 (A × A) := { + to_u64 := ToU64Pair.to_u64 A ToU64AInst } /- [traits::f]: Source: 'src/traits.rs', lines 55:0-55:36 -/ def f (T : Type) (ToU64TInst : ToU64 T) (x : (T × T)) : Result U64 := - Pair.to_u64 T ToU64TInst x + ToU64Pair.to_u64 T ToU64TInst x /- [traits::g]: Source: 'src/traits.rs', lines 59:0-61:18 -/ def g - (T : Type) (ToU64TupleTTInst : ToU64 (T × T)) (x : (T × T)) : Result U64 := - ToU64TupleTTInst.to_u64 x + (T : Type) (ToU64PairInst : ToU64 (T × T)) (x : (T × T)) : Result U64 := + ToU64PairInst.to_u64 x /- [traits::h0]: Source: 'src/traits.rs', lines 66:0-66:24 -/ def h0 (x : U64) : Result U64 := - U64.to_u64 x + ToU64U64.to_u64 x /- [traits::Wrapper] Source: 'src/traits.rs', lines 70:0-70:21 -/ structure Wrapper (T : Type) where x : T -/- [traits::{traits::Wrapper<T>#4}::to_u64]: +/- [traits::{(traits::ToU64 for traits::Wrapper<T>)#4}::to_u64]: Source: 'src/traits.rs', lines 75:4-75:26 -/ -def Wrapper.to_u64 +def ToU64traitsWrapperT.to_u64 (T : Type) (ToU64TInst : ToU64 T) (self : Wrapper T) : Result U64 := ToU64TInst.to_u64 self.x -/- Trait implementation: [traits::{traits::Wrapper<T>#4}] +/- Trait implementation: [traits::{(traits::ToU64 for traits::Wrapper<T>)#4}] Source: 'src/traits.rs', lines 74:0-74:35 -/ -def traits.ToU64traitsWrapperTInst (T : Type) (ToU64TInst : ToU64 T) : ToU64 - (Wrapper T) := { - to_u64 := Wrapper.to_u64 T ToU64TInst +def ToU64traitsWrapperT (T : Type) (ToU64TInst : ToU64 T) : ToU64 (Wrapper T) + := { + to_u64 := ToU64traitsWrapperT.to_u64 T ToU64TInst } /- [traits::h1]: Source: 'src/traits.rs', lines 80:0-80:33 -/ def h1 (x : Wrapper U64) : Result U64 := - Wrapper.to_u64 U64 traits.ToU64U64Inst x + ToU64traitsWrapperT.to_u64 U64 ToU64U64 x /- [traits::h2]: Source: 'src/traits.rs', lines 84:0-84:41 -/ def h2 (T : Type) (ToU64TInst : ToU64 T) (x : Wrapper T) : Result U64 := - Wrapper.to_u64 T ToU64TInst x + ToU64traitsWrapperT.to_u64 T ToU64TInst x /- Trait declaration: [traits::ToType] Source: 'src/traits.rs', lines 88:0-88:19 -/ structure ToType (Self T : Type) where to_type : Self → Result T -/- [traits::{u64#5}::to_type]: +/- [traits::{(traits::ToType<bool> for u64)#5}::to_type]: Source: 'src/traits.rs', lines 93:4-93:28 -/ -def U64.to_type (self : U64) : Result Bool := +def ToTypeU64Bool.to_type (self : U64) : Result Bool := Result.ret (self > 0#u64) -/- Trait implementation: [traits::{u64#5}] +/- Trait implementation: [traits::{(traits::ToType<bool> for u64)#5}] Source: 'src/traits.rs', lines 92:0-92:25 -/ -def traits.ToTypeU64BoolInst : ToType U64 Bool := { - to_type := U64.to_type +def ToTypeU64Bool : ToType U64 Bool := { + to_type := ToTypeU64Bool.to_type } /- Trait declaration: [traits::OfType] @@ -201,17 +200,17 @@ def h4 structure TestType.test.TestTrait (Self : Type) where test : Self → Result Bool -/- [traits::{traits::TestType<T>#6}::test::{traits::{traits::TestType<T>#6}::test::TestType1}::test]: +/- [traits::{traits::TestType<T>#6}::test::{(traits::{traits::TestType<T>#6}::test::TestTrait for traits::{traits::TestType<T>#6}::test::TestType1)}::test]: Source: 'src/traits.rs', lines 139:12-139:34 -/ -def TestType.test.TestType1.test +def TestType.test.TestTraittraitsTestTypetestTestType1.test (self : TestType.test.TestType1) : Result Bool := Result.ret (self > 1#u64) -/- Trait implementation: [traits::{traits::TestType<T>#6}::test::{traits::{traits::TestType<T>#6}::test::TestType1}] +/- Trait implementation: [traits::{traits::TestType<T>#6}::test::{(traits::{traits::TestType<T>#6}::test::TestTrait for traits::{traits::TestType<T>#6}::test::TestType1)}] Source: 'src/traits.rs', lines 138:8-138:36 -/ -def traits.TestType.test.TestTraittraitstraitsTestTypeTtestTestType1Inst : +def TestType.test.TestTraittraitsTestTypetestTestType1 : TestType.test.TestTrait TestType.test.TestType1 := { - test := TestType.test.TestType1.test + test := TestType.test.TestTraittraitsTestTypetestTestType1.test } /- [traits::{traits::TestType<T>#6}::test]: @@ -223,32 +222,33 @@ def TestType.test do let x1 ← ToU64TInst.to_u64 x if x1 > 0#u64 - then TestType.test.TestType1.test 0#u64 + then TestType.test.TestTraittraitsTestTypetestTestType1.test 0#u64 else Result.ret false /- [traits::BoolWrapper] Source: 'src/traits.rs', lines 150:0-150:22 -/ @[reducible] def BoolWrapper := Bool -/- [traits::{traits::BoolWrapper#7}::to_type]: +/- [traits::{(traits::ToType<T> for traits::BoolWrapper)#7}::to_type]: Source: 'src/traits.rs', lines 156:4-156:25 -/ -def BoolWrapper.to_type +def ToTypetraitsBoolWrapperT.to_type (T : Type) (ToTypeBoolTInst : ToType Bool T) (self : BoolWrapper) : Result T := ToTypeBoolTInst.to_type self -/- Trait implementation: [traits::{traits::BoolWrapper#7}] +/- Trait implementation: [traits::{(traits::ToType<T> for traits::BoolWrapper)#7}] Source: 'src/traits.rs', lines 152:0-152:33 -/ -def traits.ToTypetraitsBoolWrapperTInst (T : Type) (ToTypeBoolTInst : ToType - Bool T) : ToType BoolWrapper T := { - to_type := BoolWrapper.to_type T ToTypeBoolTInst +def ToTypetraitsBoolWrapperT (T : Type) (ToTypeBoolTInst : ToType Bool T) : + ToType BoolWrapper T := { + to_type := ToTypetraitsBoolWrapperT.to_type T ToTypeBoolTInst } /- [traits::WithConstTy::LEN2] Source: 'src/traits.rs', lines 164:4-164:21 -/ -def with_const_ty_len2_body : Result Usize := Result.ret 32#usize -def with_const_ty_len2_c : Usize := eval_global with_const_ty_len2_body +def WithConstTy.LEN2_default_body : Result Usize := Result.ret 32#usize +def WithConstTy.LEN2_default : Usize := + eval_global WithConstTy.LEN2_default_body /- Trait declaration: [traits::WithConstTy] Source: 'src/traits.rs', lines 161:0-161:39 -/ @@ -260,25 +260,25 @@ structure WithConstTy (Self : Type) (LEN : Usize) where W_clause_0 : ToU64 W f : W → Array U8 LEN → Result W -/- [traits::{bool#8}::LEN1] +/- [traits::{(traits::WithConstTy<32: usize> for bool)#8}::LEN1] Source: 'src/traits.rs', lines 175:4-175:21 -/ -def bool_len1_body : Result Usize := Result.ret 12#usize -def bool_len1_c : Usize := eval_global bool_len1_body +def WithConstTyBool32.LEN1_body : Result Usize := Result.ret 12#usize +def WithConstTyBool32.LEN1 : Usize := eval_global WithConstTyBool32.LEN1_body -/- [traits::{bool#8}::f]: +/- [traits::{(traits::WithConstTy<32: usize> for bool)#8}::f]: Source: 'src/traits.rs', lines 180:4-180:39 -/ -def Bool.f (i : U64) (a : Array U8 32#usize) : Result U64 := +def WithConstTyBool32.f (i : U64) (a : Array U8 32#usize) : Result U64 := Result.ret i -/- Trait implementation: [traits::{bool#8}] +/- Trait implementation: [traits::{(traits::WithConstTy<32: usize> for bool)#8}] Source: 'src/traits.rs', lines 174:0-174:29 -/ -def traits.WithConstTyBool32Inst : WithConstTy Bool 32#usize := { - LEN1 := bool_len1_c - LEN2 := with_const_ty_len2_c +def WithConstTyBool32 : WithConstTy Bool 32#usize := { + LEN1 := WithConstTyBool32.LEN1 + LEN2 := WithConstTy.LEN2_default V := U8 W := U64 - W_clause_0 := traits.ToU64U64Inst - f := Bool.f + W_clause_0 := ToU64U64 + f := WithConstTyBool32.f } /- [traits::use_with_const_ty1]: @@ -365,15 +365,15 @@ def order1 structure ChildTrait1 (Self : Type) where ParentTrait1SelfInst : ParentTrait1 Self -/- Trait implementation: [traits::{usize#9}] +/- Trait implementation: [traits::{(traits::ParentTrait1 for usize)#9}] Source: 'src/traits.rs', lines 224:0-224:27 -/ -def traits.ParentTrait1UsizeInst : ParentTrait1 Usize := { +def ParentTrait1Usize : ParentTrait1 Usize := { } -/- Trait implementation: [traits::{usize#10}] +/- Trait implementation: [traits::{(traits::ChildTrait1 for usize)#10}] Source: 'src/traits.rs', lines 225:0-225:26 -/ -def traits.ChildTrait1UsizeInst : ChildTrait1 Usize := { - ParentTrait1SelfInst := traits.ParentTrait1UsizeInst +def ChildTrait1Usize : ChildTrait1 Usize := { + ParentTrait1SelfInst := ParentTrait1Usize } /- Trait declaration: [traits::Iterator] @@ -417,29 +417,29 @@ structure ChildTrait2 (Self : Type) where convert : ParentTrait2SelfInst.U → Result ParentTrait2SelfInst.U_clause_0.Target -/- Trait implementation: [traits::{u32#11}] +/- Trait implementation: [traits::{(traits::WithTarget for u32)#11}] Source: 'src/traits.rs', lines 264:0-264:23 -/ -def traits.WithTargetU32Inst : WithTarget U32 := { +def WithTargetU32 : WithTarget U32 := { Target := U32 } -/- Trait implementation: [traits::{u32#12}] +/- Trait implementation: [traits::{(traits::ParentTrait2 for u32)#12}] Source: 'src/traits.rs', lines 268:0-268:25 -/ -def traits.ParentTrait2U32Inst : ParentTrait2 U32 := { +def ParentTrait2U32 : ParentTrait2 U32 := { U := U32 - U_clause_0 := traits.WithTargetU32Inst + U_clause_0 := WithTargetU32 } -/- [traits::{u32#13}::convert]: +/- [traits::{(traits::ChildTrait2 for u32)#13}::convert]: Source: 'src/traits.rs', lines 273:4-273:29 -/ -def U32.convert (x : U32) : Result U32 := +def ChildTrait2U32.convert (x : U32) : Result U32 := Result.ret x -/- Trait implementation: [traits::{u32#13}] +/- Trait implementation: [traits::{(traits::ChildTrait2 for u32)#13}] Source: 'src/traits.rs', lines 272:0-272:24 -/ -def traits.ChildTrait2U32Inst : ChildTrait2 U32 := { - ParentTrait2SelfInst := traits.ParentTrait2U32Inst - convert := U32.convert +def ChildTrait2U32 : ChildTrait2 U32 := { + ParentTrait2SelfInst := ParentTrait2U32 + convert := ChildTrait2U32.convert } /- Trait declaration: [traits::CFnOnce] |