Skip to content

Commit eeabb76

Browse files
committed
Assume freshness of fresh.
1 parent f86bec9 commit eeabb76

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/checker/Pulse.Checker.WithLocalArray.fst

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,7 @@ let check
133133
else
134134
let x = fresh g in
135135
let px = binder.binder_ppname, x in
136-
if x `Set.mem` freevars_st body
137-
then fail g
138-
(Some body.range)
139-
(Printf.sprintf "withlocalarray: %s is free in body"
140-
(T.unseal binder.binder_ppname.name))
141-
else
136+
assume ~(x `Set.mem` freevars_st body);
142137
let x_tm = term_of_nvar px in
143138
let g_extended = push_binding g x binder.binder_ppname (mk_array init_t) in
144139
let body_pre = comp_withlocal_array_body_pre pre init_t x_tm init len in
@@ -147,10 +142,7 @@ let check
147142
// elaborating this post here,
148143
// so that later we can check the computed post to be equal to this one
149144
let post : post_hint_for_env g = post in
150-
if x `Set.mem` freevars post.post
151-
then fail g None "Impossible! check_withlocal: unexpected name clash in with_local,\
152-
please file a bug-report"
153-
else
145+
assume ~(x `Set.mem` freevars post.post);
154146
let body_post = extend_post_hint g post init_t x in
155147
let (| opened_body, c_body, body_typing |) =
156148
let r =

0 commit comments

Comments
 (0)