summaryrefslogtreecommitdiff
path: root/tests/misc/Paper.fst
diff options
context:
space:
mode:
authorSon Ho2022-05-15 22:35:23 +0200
committerSon Ho2022-05-15 22:35:23 +0200
commit7ca25ab5c3e686eaca2716d003bfb04e742209ec (patch)
treeace85685c7ec3019d707d7e9532974b13e17c03a /tests/misc/Paper.fst
parentffc93a3f4d3b29e3a6805f9882f20dd22d184939 (diff)
Regenerate the F* files
Diffstat (limited to '')
-rw-r--r--tests/misc/Paper.fst14
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/misc/Paper.fst b/tests/misc/Paper.fst
index d162519a..424889ef 100644
--- a/tests/misc/Paper.fst
+++ b/tests/misc/Paper.fst
@@ -59,9 +59,9 @@ type list_t (t : Type0) =
let rec list_nth_mut_fwd (t : Type0) (l : list_t t) (i : u32) : result t =
begin match l with
| ListCons x tl ->
- begin match i with
- | 0 -> Return x
- | _ ->
+ if i = 0
+ then Return x
+ else
begin match u32_sub i 1 with
| Fail -> Fail
| Return i0 ->
@@ -70,7 +70,6 @@ let rec list_nth_mut_fwd (t : Type0) (l : list_t t) (i : u32) : result t =
| Return x0 -> Return x0
end
end
- end
| ListNil -> Fail
end
@@ -79,9 +78,9 @@ let rec list_nth_mut_back
(t : Type0) (l : list_t t) (i : u32) (ret : t) : result (list_t t) =
begin match l with
| ListCons x tl ->
- begin match i with
- | 0 -> Return (ListCons ret tl)
- | _ ->
+ if i = 0
+ then Return (ListCons ret tl)
+ else
begin match u32_sub i 1 with
| Fail -> Fail
| Return i0 ->
@@ -90,7 +89,6 @@ let rec list_nth_mut_back
| Return tl0 -> Return (ListCons x tl0)
end
end
- end
| ListNil -> Fail
end