diff options
| author | Pierre-Marie Pédrot | 2019-03-20 15:02:33 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2019-03-20 15:02:33 +0100 |
| commit | d3f40cad021e3c794be99cb90f0e2869ab389f40 (patch) | |
| tree | a77a4de1a1da4ea6cd7aff1a05e3e0324b36e2c1 /dev | |
| parent | ba33839754bb6ac0f85070e95466a2b8030fdc1b (diff) | |
| parent | 6d91a9becb10ed0554a00444f5aaf023375d68b8 (diff) | |
Merge PR #9678: Stop accessing proof env via Pfedit in printers
Ack-by: JasonGross
Ack-by: ejgallego
Ack-by: gares
Ack-by: maximedenes
Ack-by: ppedrot
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/ci/user-overlays/09678-printed-by-env.sh | 14 | ||||
| -rw-r--r-- | dev/doc/changes.md | 9 | ||||
| -rw-r--r-- | dev/top_printers.ml | 2 |
3 files changed, 24 insertions, 1 deletions
diff --git a/dev/ci/user-overlays/09678-printed-by-env.sh b/dev/ci/user-overlays/09678-printed-by-env.sh new file mode 100644 index 0000000000..ccb3498764 --- /dev/null +++ b/dev/ci/user-overlays/09678-printed-by-env.sh @@ -0,0 +1,14 @@ + +if [ "$CI_PULL_REQUEST" = "9678" ] || [ "$CI_BRANCH" = "printed-by-env" ]; then + elpi_CI_REF=printed-by-env + elpi_CI_GITURL=https://github.com/maximedenes/coq-elpi + + equations_CI_REF=printed-by-env + equations_CI_GITURL=https://github.com/maximedenes/Coq-Equations + + ltac2_CI_REF=printed-by-env + ltac2_CI_GITURL=https://github.com/maximedenes/ltac2 + + quickchick_CI_REF=printed-by-env + quickchick_CI_GITURL=https://github.com/maximedenes/QuickChick +fi diff --git a/dev/doc/changes.md b/dev/doc/changes.md index d515ec30e8..416253fad1 100644 --- a/dev/doc/changes.md +++ b/dev/doc/changes.md @@ -54,6 +54,15 @@ Macros: where `atts : Vernacexpr.vernac_flags` was bound in the expression and had to be manually parsed. +- `PRINTED BY` now binds `env` and `sigma`, and expects printers which take + as parameters term printers parametrized by an environment and an `evar_map`. + +Printers + +- `Ppconstr.pr_constr_expr`, `Ppconstr.lconstr_expr`, + `Ppconstr.pr_constr_pattern_expr` and `Ppconstr.pr_lconstr_pattern_expr` + now all take an environment and an `evar_map`. + Libobject - A Higher-level API for objects with fixed scope was introduced. It supports the following kinds of objects: diff --git a/dev/top_printers.ml b/dev/top_printers.ml index 0fbb0634a5..499bbba37e 100644 --- a/dev/top_printers.ml +++ b/dev/top_printers.ml @@ -72,7 +72,7 @@ let pr_econstr t = Printer.pr_econstr_env env sigma t let ppconstr x = pp (pr_constr x) let ppeconstr x = pp (pr_econstr x) -let ppconstr_expr x = pp (Ppconstr.pr_constr_expr x) +let ppconstr_expr x = let sigma,env = Pfedit.get_current_context () in pp (Ppconstr.pr_constr_expr env sigma x) let ppsconstr x = ppconstr (Mod_subst.force_constr x) let ppconstr_univ x = Constrextern.with_universes ppconstr x let ppglob_constr = (fun x -> pp(pr_lglob_constr_env (Global.env()) x)) |
