File tree Expand file tree Collapse file tree 8 files changed +410
-716
lines changed
hax-lib/proof-libs/lean/Hax
test-harness/src/snapshots Expand file tree Collapse file tree 8 files changed +410
-716
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,8 @@ instance {β} : Coe (α -> i32 -> β) (α -> Nat -> β) where
221
221
instance : OfNat (Result Nat) n where
222
222
ofNat := pure (n)
223
223
224
+ instance {α n} [i: OfNat α n] : OfNat (Result α) n where
225
+ ofNat := pure (i.ofNat)
224
226
225
227
/-
226
228
@@ -889,7 +891,9 @@ end Fold
889
891
Rust arrays, are represented as Lean `Vector` (Lean Arrays of known size)
890
892
891
893
-/
892
- section Array
894
+ section RustArray
895
+
896
+ abbrev RustArray := Vector
893
897
894
898
inductive array_TryFromSliceError where
895
899
| array_TryFromSliceError
@@ -943,7 +947,7 @@ theorem convert_TryInto_try_success_spec {α n} (a: Array α) :
943
947
split <;> grind
944
948
945
949
946
- end Array
950
+ end RustArray
947
951
948
952
/-
949
953
@@ -1133,6 +1137,8 @@ Rust vectors are represented as Lean Arrays (variable size)
1133
1137
-/
1134
1138
section RustVectors
1135
1139
1140
+ abbrev RustVector := Array
1141
+
1136
1142
def alloc_Global : Type := Unit
1137
1143
def vec_Vec (α: Type ) (_Allocator:Type ) : Type := Array α
1138
1144
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ pub mod global_id {
105
105
/// Tests if the raw output is reduced to "_". Should be used only for
106
106
/// testing. See https://github.com/cryspen/hax/issues/1599
107
107
pub fn is_empty ( & self ) -> bool {
108
- self . to_debug_string ( ) == "_" . to_string ( )
108
+ self . to_debug_string ( ) == "_"
109
109
}
110
110
111
111
/// Extract the raw `DefId` from a `GlobalId`.
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ pub trait Backend {
51
51
52
52
/// The AST phases to apply before printing.
53
53
///
54
- /// Backends can override this to add transformations.
54
+ /// Backends can override this to add transformations.
55
55
/// The default is an empty list (no transformations).
56
56
fn phases ( & self ) -> Vec < Box < dyn crate :: phase:: Phase > > {
57
57
vec ! [ ]
@@ -111,10 +111,15 @@ mod prelude {
111
111
//! Importing this prelude saves repetitive `use` lists in per-backend
112
112
//! modules without forcing these names on downstream users.
113
113
pub use super :: Backend ;
114
+ pub use crate :: ast:: identifiers:: * ;
115
+ pub use crate :: ast:: literals:: * ;
116
+ pub use crate :: ast:: resugared:: * ;
114
117
pub use crate :: ast:: * ;
115
118
pub use crate :: printer:: * ;
119
+ pub use crate :: symbol:: Symbol ;
116
120
pub use hax_rust_engine_macros:: prepend_associated_functions_with;
117
121
pub use pretty:: DocAllocator ;
122
+ pub use pretty:: DocBuilder ;
118
123
pub use pretty:: Pretty ;
119
124
pub use pretty_ast:: install_pretty_helpers;
120
125
}
You can’t perform that action at this time.
0 commit comments