Skip to content

Commit 7822d71

Browse files
Merge pull request #501 from formal-land/gy@UniformizeWarnings
Uniformize Warnings & 100 Character Line Width
2 parents 88290f5 + 57f1b14 commit 7822d71

File tree

326 files changed

+4024
-14962
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

326 files changed

+4024
-14962
lines changed

CoqOfRust/examples/axiomatized/examples/custom/provided_method.v

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ Module ProvidedAndRequired.
66
Parameter provided : (list Ty.t) -> (list Value.t) -> M.
77

88
Axiom ProvidedMethod_provided :
9-
M.IsProvidedMethod
10-
"provided_method::ProvidedAndRequired"
11-
"provided"
12-
provided.
9+
M.IsProvidedMethod "provided_method::ProvidedAndRequired" "provided" provided.
1310
End ProvidedAndRequired.
1411

1512
Module Impl_provided_method_ProvidedAndRequired_for_i32.
@@ -38,9 +35,7 @@ Module Impl_provided_method_ProvidedAndRequired_for_u32.
3835
Self
3936
(* Trait polymorphic types *) []
4037
(* Instance *)
41-
[
42-
("required", InstanceField.Method required);
43-
("provided", InstanceField.Method provided)
38+
[ ("required", InstanceField.Method required); ("provided", InstanceField.Method provided)
4439
].
4540
End Impl_provided_method_ProvidedAndRequired_for_u32.
4641

CoqOfRust/examples/axiomatized/examples/ink_contracts/basic_contract_caller.v

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,11 @@ Module Impl_core_marker_Copy_for_basic_contract_caller_AccountId.
3838
Definition Self : Ty.t := Ty.path "basic_contract_caller::AccountId".
3939

4040
Axiom Implements :
41-
M.IsTraitInstance
42-
"core::marker::Copy"
43-
Self
44-
(* Trait polymorphic types *) []
45-
(* Instance *) [].
41+
M.IsTraitInstance "core::marker::Copy" Self (* Trait polymorphic types *) [] (* Instance *) [].
4642
End Impl_core_marker_Copy_for_basic_contract_caller_AccountId.
4743

4844
Axiom Hash :
49-
(Ty.path "basic_contract_caller::Hash") =
50-
(Ty.apply (Ty.path "array") [ Ty.path "u8" ]).
45+
(Ty.path "basic_contract_caller::Hash") = (Ty.apply (Ty.path "array") [ Ty.path "u8" ]).
5146

5247
(* Enum Error *)
5348
(* {
@@ -82,20 +77,17 @@ End Impl_basic_contract_caller_OtherContract.
8277
{
8378
name := "BasicContractCaller";
8479
ty_params := [];
85-
fields :=
86-
[ ("other_contract", Ty.path "basic_contract_caller::OtherContract") ];
80+
fields := [ ("other_contract", Ty.path "basic_contract_caller::OtherContract") ];
8781
} *)
8882

8983
Module Impl_basic_contract_caller_BasicContractCaller.
90-
Definition Self : Ty.t :=
91-
Ty.path "basic_contract_caller::BasicContractCaller".
84+
Definition Self : Ty.t := Ty.path "basic_contract_caller::BasicContractCaller".
9285

9386
Parameter new : (list Ty.t) -> (list Value.t) -> M.
9487

9588
Axiom AssociatedFunction_new : M.IsAssociatedFunction Self "new" new.
9689

9790
Parameter flip_and_get : (list Ty.t) -> (list Value.t) -> M.
9891

99-
Axiom AssociatedFunction_flip_and_get :
100-
M.IsAssociatedFunction Self "flip_and_get" flip_and_get.
92+
Axiom AssociatedFunction_flip_and_get : M.IsAssociatedFunction Self "flip_and_get" flip_and_get.
10193
End Impl_basic_contract_caller_BasicContractCaller.

CoqOfRust/examples/axiomatized/examples/ink_contracts/call_runtime.v

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ Module Impl_core_marker_Copy_for_call_runtime_AccountId.
3838
Definition Self : Ty.t := Ty.path "call_runtime::AccountId".
3939

4040
Axiom Implements :
41-
M.IsTraitInstance
42-
"core::marker::Copy"
43-
Self
44-
(* Trait polymorphic types *) []
45-
(* Instance *) [].
41+
M.IsTraitInstance "core::marker::Copy" Self (* Trait polymorphic types *) [] (* Instance *) [].
4642
End Impl_core_marker_Copy_for_call_runtime_AccountId.
4743

4844
Axiom Balance : (Ty.path "call_runtime::Balance") = (Ty.path "u128").
@@ -72,8 +68,7 @@ Module Impl_core_convert_From_call_runtime_AccountId_for_call_runtime_MultiAddre
7268
M.IsTraitInstance
7369
"core::convert::From"
7470
Self
75-
(* Trait polymorphic types *)
76-
[ (* T *) Ty.path "call_runtime::AccountId" ]
71+
(* Trait polymorphic types *) [ (* T *) Ty.path "call_runtime::AccountId" ]
7772
(* Instance *) [ ("from", InstanceField.Method from) ].
7873
End Impl_core_convert_From_call_runtime_AccountId_for_call_runtime_MultiAddress_call_runtime_AccountId_Tuple_.
7974

@@ -202,10 +197,7 @@ Module Impl_core_cmp_Eq_for_call_runtime_RuntimeError.
202197
Self
203198
(* Trait polymorphic types *) []
204199
(* Instance *)
205-
[
206-
("assert_receiver_is_total_eq",
207-
InstanceField.Method assert_receiver_is_total_eq)
208-
].
200+
[ ("assert_receiver_is_total_eq", InstanceField.Method assert_receiver_is_total_eq) ].
209201
End Impl_core_cmp_Eq_for_call_runtime_RuntimeError.
210202

211203
(* Enum EnvError *)
@@ -244,17 +236,15 @@ Module Impl_call_runtime_Env.
244236

245237
Parameter call_runtime : (list Ty.t) -> (list Value.t) -> M.
246238

247-
Axiom AssociatedFunction_call_runtime :
248-
M.IsAssociatedFunction Self "call_runtime" call_runtime.
239+
Axiom AssociatedFunction_call_runtime : M.IsAssociatedFunction Self "call_runtime" call_runtime.
249240
End Impl_call_runtime_Env.
250241

251242
Module Impl_call_runtime_RuntimeCaller.
252243
Definition Self : Ty.t := Ty.path "call_runtime::RuntimeCaller".
253244

254245
Parameter init_env : (list Ty.t) -> (list Value.t) -> M.
255246

256-
Axiom AssociatedFunction_init_env :
257-
M.IsAssociatedFunction Self "init_env" init_env.
247+
Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env.
258248

259249
Parameter env : (list Ty.t) -> (list Value.t) -> M.
260250

@@ -267,16 +257,10 @@ Module Impl_call_runtime_RuntimeCaller.
267257
Parameter transfer_through_runtime : (list Ty.t) -> (list Value.t) -> M.
268258

269259
Axiom AssociatedFunction_transfer_through_runtime :
270-
M.IsAssociatedFunction
271-
Self
272-
"transfer_through_runtime"
273-
transfer_through_runtime.
260+
M.IsAssociatedFunction Self "transfer_through_runtime" transfer_through_runtime.
274261

275262
Parameter call_nonexistent_extrinsic : (list Ty.t) -> (list Value.t) -> M.
276263

277264
Axiom AssociatedFunction_call_nonexistent_extrinsic :
278-
M.IsAssociatedFunction
279-
Self
280-
"call_nonexistent_extrinsic"
281-
call_nonexistent_extrinsic.
265+
M.IsAssociatedFunction Self "call_nonexistent_extrinsic" call_nonexistent_extrinsic.
282266
End Impl_call_runtime_RuntimeCaller.

CoqOfRust/examples/axiomatized/examples/ink_contracts/conditional_compilation.v

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,12 @@ Module Impl_core_marker_Copy_for_conditional_compilation_AccountId.
3838
Definition Self : Ty.t := Ty.path "conditional_compilation::AccountId".
3939

4040
Axiom Implements :
41-
M.IsTraitInstance
42-
"core::marker::Copy"
43-
Self
44-
(* Trait polymorphic types *) []
45-
(* Instance *) [].
41+
M.IsTraitInstance "core::marker::Copy" Self (* Trait polymorphic types *) [] (* Instance *) [].
4642
End Impl_core_marker_Copy_for_conditional_compilation_AccountId.
4743

4844
Axiom Balance : (Ty.path "conditional_compilation::Balance") = (Ty.path "u128").
4945

50-
Axiom BlockNumber :
51-
(Ty.path "conditional_compilation::BlockNumber") = (Ty.path "u32").
46+
Axiom BlockNumber : (Ty.path "conditional_compilation::BlockNumber") = (Ty.path "u32").
5247

5348
(* StructRecord
5449
{
@@ -65,10 +60,7 @@ Axiom BlockNumber :
6560
name := "Changes";
6661
ty_params := [];
6762
fields :=
68-
[
69-
("new_value", Ty.path "bool");
70-
("by_", Ty.path "conditional_compilation::AccountId")
71-
];
63+
[ ("new_value", Ty.path "bool"); ("by_", Ty.path "conditional_compilation::AccountId") ];
7264
} *)
7365

7466
(* StructRecord
@@ -110,13 +102,11 @@ Module Impl_conditional_compilation_Env.
110102

111103
Parameter emit_event : (list Ty.t) -> (list Value.t) -> M.
112104

113-
Axiom AssociatedFunction_emit_event :
114-
M.IsAssociatedFunction Self "emit_event" emit_event.
105+
Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event.
115106

116107
Parameter block_number : (list Ty.t) -> (list Value.t) -> M.
117108

118-
Axiom AssociatedFunction_block_number :
119-
M.IsAssociatedFunction Self "block_number" block_number.
109+
Axiom AssociatedFunction_block_number : M.IsAssociatedFunction Self "block_number" block_number.
120110
End Impl_conditional_compilation_Env.
121111

122112
(* StructRecord
@@ -127,13 +117,11 @@ End Impl_conditional_compilation_Env.
127117
} *)
128118

129119
Module Impl_conditional_compilation_ConditionalCompilation.
130-
Definition Self : Ty.t :=
131-
Ty.path "conditional_compilation::ConditionalCompilation".
120+
Definition Self : Ty.t := Ty.path "conditional_compilation::ConditionalCompilation".
132121

133122
Parameter init_env : (list Ty.t) -> (list Value.t) -> M.
134123

135-
Axiom AssociatedFunction_init_env :
136-
M.IsAssociatedFunction Self "init_env" init_env.
124+
Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env.
137125

138126
Parameter env : (list Ty.t) -> (list Value.t) -> M.
139127

@@ -145,18 +133,15 @@ Module Impl_conditional_compilation_ConditionalCompilation.
145133

146134
Parameter new_foo : (list Ty.t) -> (list Value.t) -> M.
147135

148-
Axiom AssociatedFunction_new_foo :
149-
M.IsAssociatedFunction Self "new_foo" new_foo.
136+
Axiom AssociatedFunction_new_foo : M.IsAssociatedFunction Self "new_foo" new_foo.
150137

151138
Parameter new_bar : (list Ty.t) -> (list Value.t) -> M.
152139

153-
Axiom AssociatedFunction_new_bar :
154-
M.IsAssociatedFunction Self "new_bar" new_bar.
140+
Axiom AssociatedFunction_new_bar : M.IsAssociatedFunction Self "new_bar" new_bar.
155141

156142
Parameter new_foo_bar : (list Ty.t) -> (list Value.t) -> M.
157143

158-
Axiom AssociatedFunction_new_foo_bar :
159-
M.IsAssociatedFunction Self "new_foo_bar" new_foo_bar.
144+
Axiom AssociatedFunction_new_foo_bar : M.IsAssociatedFunction Self "new_foo_bar" new_foo_bar.
160145

161146
Parameter inherent_flip_foo : (list Ty.t) -> (list Value.t) -> M.
162147

@@ -170,8 +155,7 @@ Module Impl_conditional_compilation_ConditionalCompilation.
170155
End Impl_conditional_compilation_ConditionalCompilation.
171156

172157
Module Impl_conditional_compilation_Flip_for_conditional_compilation_ConditionalCompilation.
173-
Definition Self : Ty.t :=
174-
Ty.path "conditional_compilation::ConditionalCompilation".
158+
Definition Self : Ty.t := Ty.path "conditional_compilation::ConditionalCompilation".
175159

176160
Parameter flip : (list Ty.t) -> (list Value.t) -> M.
177161

CoqOfRust/examples/axiomatized/examples/ink_contracts/contract_terminate.v

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ Module Impl_core_marker_Copy_for_contract_terminate_AccountId.
3838
Definition Self : Ty.t := Ty.path "contract_terminate::AccountId".
3939

4040
Axiom Implements :
41-
M.IsTraitInstance
42-
"core::marker::Copy"
43-
Self
44-
(* Trait polymorphic types *) []
45-
(* Instance *) [].
41+
M.IsTraitInstance "core::marker::Copy" Self (* Trait polymorphic types *) [] (* Instance *) [].
4642
End Impl_core_marker_Copy_for_contract_terminate_AccountId.
4743

4844
(* StructRecord
@@ -76,8 +72,7 @@ Module Impl_contract_terminate_JustTerminate.
7672

7773
Parameter init_env : (list Ty.t) -> (list Value.t) -> M.
7874

79-
Axiom AssociatedFunction_init_env :
80-
M.IsAssociatedFunction Self "init_env" init_env.
75+
Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env.
8176

8277
Parameter env : (list Ty.t) -> (list Value.t) -> M.
8378

@@ -89,6 +84,5 @@ Module Impl_contract_terminate_JustTerminate.
8984

9085
Parameter terminate_me : (list Ty.t) -> (list Value.t) -> M.
9186

92-
Axiom AssociatedFunction_terminate_me :
93-
M.IsAssociatedFunction Self "terminate_me" terminate_me.
87+
Axiom AssociatedFunction_terminate_me : M.IsAssociatedFunction Self "terminate_me" terminate_me.
9488
End Impl_contract_terminate_JustTerminate.

CoqOfRust/examples/axiomatized/examples/ink_contracts/contract_transfer.v

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ Module Impl_core_marker_Copy_for_contract_transfer_AccountId.
3838
Definition Self : Ty.t := Ty.path "contract_transfer::AccountId".
3939

4040
Axiom Implements :
41-
M.IsTraitInstance
42-
"core::marker::Copy"
43-
Self
44-
(* Trait polymorphic types *) []
45-
(* Instance *) [].
41+
M.IsTraitInstance "core::marker::Copy" Self (* Trait polymorphic types *) [] (* Instance *) [].
4642
End Impl_core_marker_Copy_for_contract_transfer_AccountId.
4743

4844
Axiom Balance : (Ty.path "contract_transfer::Balance") = (Ty.path "u128").
@@ -63,13 +59,11 @@ Module Impl_contract_transfer_Env.
6359

6460
Parameter balance : (list Ty.t) -> (list Value.t) -> M.
6561

66-
Axiom AssociatedFunction_balance :
67-
M.IsAssociatedFunction Self "balance" balance.
62+
Axiom AssociatedFunction_balance : M.IsAssociatedFunction Self "balance" balance.
6863

6964
Parameter transfer : (list Ty.t) -> (list Value.t) -> M.
7065

71-
Axiom AssociatedFunction_transfer :
72-
M.IsAssociatedFunction Self "transfer" transfer.
66+
Axiom AssociatedFunction_transfer : M.IsAssociatedFunction Self "transfer" transfer.
7367

7468
Parameter transferred_value : (list Ty.t) -> (list Value.t) -> M.
7569

@@ -88,8 +82,7 @@ Module Impl_contract_transfer_GiveMe.
8882

8983
Parameter init_env : (list Ty.t) -> (list Value.t) -> M.
9084

91-
Axiom AssociatedFunction_init_env :
92-
M.IsAssociatedFunction Self "init_env" init_env.
85+
Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env.
9386

9487
Parameter env : (list Ty.t) -> (list Value.t) -> M.
9588

@@ -101,11 +94,9 @@ Module Impl_contract_transfer_GiveMe.
10194

10295
Parameter give_me : (list Ty.t) -> (list Value.t) -> M.
10396

104-
Axiom AssociatedFunction_give_me :
105-
M.IsAssociatedFunction Self "give_me" give_me.
97+
Axiom AssociatedFunction_give_me : M.IsAssociatedFunction Self "give_me" give_me.
10698

10799
Parameter was_it_ten : (list Ty.t) -> (list Value.t) -> M.
108100

109-
Axiom AssociatedFunction_was_it_ten :
110-
M.IsAssociatedFunction Self "was_it_ten" was_it_ten.
101+
Axiom AssociatedFunction_was_it_ten : M.IsAssociatedFunction Self "was_it_ten" was_it_ten.
111102
End Impl_contract_transfer_GiveMe.

CoqOfRust/examples/axiomatized/examples/ink_contracts/custom_allocator.v

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ Require Import CoqOfRust.CoqOfRust.
88
fields :=
99
[
1010
("value",
11-
Ty.apply
12-
(Ty.path "alloc::vec::Vec")
13-
[ Ty.path "bool"; Ty.path "alloc::alloc::Global" ])
11+
Ty.apply (Ty.path "alloc::vec::Vec") [ Ty.path "bool"; Ty.path "alloc::alloc::Global" ])
1412
];
1513
} *)
1614

@@ -23,8 +21,7 @@ Module Impl_custom_allocator_CustomAllocator.
2321

2422
Parameter default : (list Ty.t) -> (list Value.t) -> M.
2523

26-
Axiom AssociatedFunction_default :
27-
M.IsAssociatedFunction Self "default" default.
24+
Axiom AssociatedFunction_default : M.IsAssociatedFunction Self "default" default.
2825

2926
Parameter flip : (list Ty.t) -> (list Value.t) -> M.
3027

CoqOfRust/examples/axiomatized/examples/ink_contracts/custom_environment.v

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ Module Impl_core_marker_Copy_for_custom_environment_AccountId.
3838
Definition Self : Ty.t := Ty.path "custom_environment::AccountId".
3939

4040
Axiom Implements :
41-
M.IsTraitInstance
42-
"core::marker::Copy"
43-
Self
44-
(* Trait polymorphic types *) []
45-
(* Instance *) [].
41+
M.IsTraitInstance "core::marker::Copy" Self (* Trait polymorphic types *) [] (* Instance *) [].
4642
End Impl_core_marker_Copy_for_custom_environment_AccountId.
4743

4844
Axiom Balance : (Ty.path "custom_environment::Balance") = (Ty.path "u128").
@@ -122,17 +118,15 @@ Module Impl_custom_environment_Env.
122118

123119
Parameter emit_event : (list Ty.t) -> (list Value.t) -> M.
124120

125-
Axiom AssociatedFunction_emit_event :
126-
M.IsAssociatedFunction Self "emit_event" emit_event.
121+
Axiom AssociatedFunction_emit_event : M.IsAssociatedFunction Self "emit_event" emit_event.
127122
End Impl_custom_environment_Env.
128123

129124
Module Impl_custom_environment_Topics.
130125
Definition Self : Ty.t := Ty.path "custom_environment::Topics".
131126

132127
Parameter init_env : (list Ty.t) -> (list Value.t) -> M.
133128

134-
Axiom AssociatedFunction_init_env :
135-
M.IsAssociatedFunction Self "init_env" init_env.
129+
Axiom AssociatedFunction_init_env : M.IsAssociatedFunction Self "init_env" init_env.
136130

137131
Parameter env : (list Ty.t) -> (list Value.t) -> M.
138132

@@ -144,6 +138,5 @@ Module Impl_custom_environment_Topics.
144138

145139
Parameter trigger : (list Ty.t) -> (list Value.t) -> M.
146140

147-
Axiom AssociatedFunction_trigger :
148-
M.IsAssociatedFunction Self "trigger" trigger.
141+
Axiom AssociatedFunction_trigger : M.IsAssociatedFunction Self "trigger" trigger.
149142
End Impl_custom_environment_Topics.

0 commit comments

Comments
 (0)