summaryrefslogtreecommitdiff
path: root/tests/fstar/misc/Paper.fst
diff options
context:
space:
mode:
authorSon Ho2024-04-04 15:48:25 +0200
committerSon Ho2024-04-04 15:48:25 +0200
commita882e28134dc6c44e7a2b5b82eb42041e9a1f342 (patch)
tree98a00a150d03b8088df62550a6d8ab0f23c0e779 /tests/fstar/misc/Paper.fst
parent1f3ce79023d902d0145da38e878d991a6ba29236 (diff)
parent7f7387c5519da00133ad557450695e6d6838f93c (diff)
Merge remote-tracking branch 'origin/main' into escherichia/error_catching
Diffstat (limited to '')
-rw-r--r--tests/fstar/misc/Paper.fst11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/fstar/misc/Paper.fst b/tests/fstar/misc/Paper.fst
index ddc5e7a8..c2f47ad1 100644
--- a/tests/fstar/misc/Paper.fst
+++ b/tests/fstar/misc/Paper.fst
@@ -23,8 +23,8 @@ let _ = assert_norm (test_incr = Return ())
let choose
(t : Type0) (b : bool) (x : t) (y : t) : result (t & (t -> result (t & t))) =
if b
- then let back_'a = fun ret -> Return (ret, y) in Return (x, back_'a)
- else let back_'a = fun ret -> Return (x, ret) in Return (y, back_'a)
+ then let back = fun ret -> Return (ret, y) in Return (x, back)
+ else let back = fun ret -> Return (x, ret) in Return (y, back)
(** [paper::test_choose]:
Source: 'src/paper.rs', lines 23:0-23:20 *)
@@ -57,15 +57,14 @@ let rec list_nth_mut
begin match l with
| List_Cons x tl ->
if i = 0
- then
- let back_'a = fun ret -> Return (List_Cons ret tl) in Return (x, back_'a)
+ then let back = fun ret -> Return (List_Cons ret tl) in Return (x, back)
else
let* i1 = u32_sub i 1 in
let* (x1, list_nth_mut_back) = list_nth_mut t tl i1 in
- let back_'a =
+ let back =
fun ret -> let* tl1 = list_nth_mut_back ret in Return (List_Cons x tl1)
in
- Return (x1, back_'a)
+ Return (x1, back)
| List_Nil -> Fail Failure
end