-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #369 from hacspec/monomorphize-update-at
Monomorphize update at
- Loading branch information
Showing
5 changed files
with
111 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
proof-libs/fstar/rust_primitives/Rust_primitives.Hax.Monomorphized_update_at.fst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
module Rust_primitives.Hax.Monomorphized_update_at | ||
|
||
open Rust_primitives | ||
open Rust_primitives.Hax | ||
open Core.Ops.Range | ||
|
||
let update_at_usize | ||
(s: t_Slice 't) | ||
(i: usize {i <. length s}) | ||
(v: 't) | ||
: t_Array 't (length s) | ||
= update_at s i v | ||
|
||
let update_at_range #n | ||
(s: t_Slice 't) | ||
(i: t_Range (int_t n) {(impl_index_range_slice 't n).in_range s i}) | ||
(v: t_Slice 't) | ||
: t_Array 't (length s) | ||
= update_at s i v | ||
|
||
let update_at_range_to #n | ||
(s: t_Slice 't) | ||
(i: t_RangeTo (int_t n) {(impl_index_range_to_slice 't n).in_range s i}) | ||
(v: t_Slice 't) | ||
: t_Array 't (length s) | ||
= update_at s i v | ||
|
||
let update_at_range_from #n | ||
(s: t_Slice 't) | ||
(i: t_RangeFrom (int_t n) {(impl_index_range_from_slice 't n).in_range s i}) | ||
(v: t_Slice 't) | ||
: t_Array 't (length s) | ||
= update_at s i v | ||
|
||
let update_at_range_full | ||
(s: t_Slice 't) | ||
(i: t_RangeFull {(impl_index_range_full_slice 't).in_range s i}) | ||
(v: t_Slice 't) | ||
: t_Array 't (length s) | ||
= update_at s i v | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters