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

Misc fixes #3086

Merged
merged 6 commits into from
Nov 8, 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
31 changes: 16 additions & 15 deletions ocaml/fstar-lib/generated/FStar_TypeChecker_Cfg.ml

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

166 changes: 89 additions & 77 deletions ocaml/fstar-lib/generated/FStar_TypeChecker_TcTerm.ml

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

57 changes: 21 additions & 36 deletions ocaml/fstar-lib/generated/FStar_TypeChecker_Util.ml

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

2 changes: 1 addition & 1 deletion src/typechecker/FStar.TypeChecker.Cfg.fst
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,7 @@ let config' psteps s e =
{tcenv = e;
debug = if dbg_flag || Options.debug_any () then
{ gen = Env.debug e (Options.Other "Norm") || dbg_flag
; top = Env.debug e (Options.Other "NormTop")
; top = Env.debug e (Options.Other "NormTop") || dbg_flag
; cfg = Env.debug e (Options.Other "NormCfg")
; primop = Env.debug e (Options.Other "Primops")
; unfolding = Env.debug e (Options.Other "Unfolding")
Expand Down
2 changes: 2 additions & 0 deletions src/typechecker/FStar.TypeChecker.Cfg.fsti
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ type debug_switches = {
erase_erasable_args: bool;
}

val no_debug_switches : debug_switches

type cfg = {
steps: fsteps;
tcenv: Env.env;
Expand Down
2 changes: 1 addition & 1 deletion src/typechecker/FStar.TypeChecker.Normalize.fst
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ type branches = list (pat * option term * term)

type stack_elt =
| Arg of closure * aqual * Range.range
| UnivArgs of list universe * Range.range
| UnivArgs of list universe * Range.range // NB: universes must be values already, no bvars allowed
| MemoLazy of cfg_memo (env * term)
| Match of env * option match_returns_ascription * branches * option residual_comp * cfg * Range.range
| Abs of env * binders * env * option residual_comp * Range.range //the second env is the first one extended with the binders, for reducing the option lcomp
Expand Down
3 changes: 3 additions & 0 deletions src/typechecker/FStar.TypeChecker.TcTerm.fst
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,9 @@ let check_expected_effect env (use_eq:bool) (copt:option comp) (ec : term * comp
Some g)
else None, c, None
in
def_check_comp_closed_in_env c.pos "check_expected_effect.c.before_norm" env c;
let c = norm_c env c in
def_check_comp_closed_in_env c.pos "check_expected_effect.c.after_norm" env c;
match expected_c_opt with
| None ->
e, c, (match gopt with | None -> Env.trivial_guard | Some g -> g)
Expand All @@ -310,6 +312,7 @@ let check_expected_effect env (use_eq:bool) (copt:option comp) (ec : term * comp

let c = TcUtil.maybe_assume_result_eq_pure_term env e (TcComm.lcomp_of_comp c) in
let c, g_c = TcComm.lcomp_comp c in
def_check_comp_closed_in_env c.pos "check_expected_effect.c.after_assume" env c;
if debug env <| Options.Medium then
BU.print4 "In check_expected_effect, asking rel to solve the problem on e=(%s) and c=(%s), expected_c=(%s), and use_eq=%s\n"
(Print.term_to_string e)
Expand Down
Loading