Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a scoping bug #3162

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions ocaml/fstar-lib/generated/FStar_TypeChecker_Rel.ml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions src/typechecker/FStar.TypeChecker.Rel.fst
Original file line number Diff line number Diff line change
Expand Up @@ -3983,17 +3983,18 @@ and solve_t' (problem:tprob) (wl:worklist) : solution =
({ x1 with sort = t1 }), ({ x2 with sort = t2 })
| _ -> x1, x2
in
(* A bit hackish *)
let t1 = U.refine x1 phi1 in
let t2 = U.refine x2 phi2 in
(* / hack *)
(* A bit hackish, reconstruct the refinements and flatten them with
as_refinement. *)
let t1 = S.mk (Tm_refine {b=x1; phi=phi1}) t1.pos in
let t2 = S.mk (Tm_refine {b=x2; phi=phi2}) t2.pos in
let x1, phi1 = as_refinement false env t1 in
let x2, phi2 = as_refinement false env t2 in
(* / hack *)
if debug wl (Options.Other "Rel") then begin
BU.print3 "ref1 = (%s):(%s){%s}\n" (Print.bv_to_string x1)
BU.print3 "ref1 = (%s):(%s){%s}\n" (show x1)
(show x1.sort)
(show phi1);
BU.print3 "ref2 = (%s):(%s){%s}\n" (Print.bv_to_string x2)
BU.print3 "ref2 = (%s):(%s){%s}\n" (show x2)
(show x2.sort)
(show phi2)
end;
Expand Down