Skip to content

Commit a449c3b

Browse files
committed
wip
1 parent 7c2e919 commit a449c3b

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

src/checker/Pulse.Checker.Prover.fst

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -668,18 +668,27 @@ let try_prove (g: env) (ctxt goals: slprop) allow_amb : T.Tac (prover_result g [
668668
cont_elab_equiv before h1 (VE_Refl _ _),
669669
cont_elab_equiv after (VE_Refl _ _) h2 |)
670670

671+
let pp_slprops ts = ts
672+
|> List.Tot.map elab_slprop
673+
|> sort_terms
674+
|> T.map pp
675+
|> separate hardline
676+
671677
let prove rng (g: env) (ctxt goals: slprop) allow_amb :
672678
T.Tac (g':env { env_extends g' g } &
673679
ctxt': slprop &
674680
continuation_elaborator g ctxt g' (goals `tm_star` ctxt')) =
675681
let (| g', ctxt', goals', solved', k |) = try_prove g ctxt goals allow_amb in
676682
if Cons? goals' then
677-
T.fail_doc_at [
678-
text "Cannot prove any of:";
679-
separate hardline (T.map (fun t -> pp (elab_slprop t)) goals');
680-
text "In context:";
681-
separate hardline (T.map (fun t -> pp (elab_slprop t)) ctxt');
682-
] (Some rng)
683+
T.fail_doc_at ([
684+
text (if List.length goals' > 1 then "Cannot prove any of:" else "Cannot prove:") ^^
685+
indent (pp_slprops goals');
686+
text "In the context:" ^^ indent (pp_slprops ctxt');
687+
] @ (if Pulse.Config.debug_flag "initial_solver_state" then [
688+
text "The prover was started with goal:" ^^ indent (pp goals);
689+
text "and initial context:" ^^ indent (pp ctxt);
690+
] else []))
691+
(Some rng)
683692
else
684693
let before, after = k g' in
685694
let h: slprop_equiv g' (elab_slprops (solved' @ ctxt')) (elab_slprops (ctxt' @ solved' @ goals')) = RU.magic () in

0 commit comments

Comments
 (0)