diff options
| author | Emilio Jesus Gallego Arias | 2019-03-29 19:43:13 +0100 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2019-03-29 19:43:13 +0100 |
| commit | b7ae5d2409d2bda56a9e7e85d12f070b879afd4b (patch) | |
| tree | 21578583dabad42446a92dfbc26dfc176167cc3d /dev | |
| parent | ae9cc11c9975cc7ced1800f6684e160bc17fb092 (diff) | |
| parent | c03d007ceeae5c2c5c835b03ce3dd2fb5be8212d (diff) | |
Merge PR #9858: Fix top_printers after removal of imperative state
Reviewed-by: ejgallego
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/top_printers.ml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dev/top_printers.ml b/dev/top_printers.ml index 1f4f2246be..74be300134 100644 --- a/dev/top_printers.ml +++ b/dev/top_printers.ml @@ -60,7 +60,11 @@ let prrecarg = function str "Imbr[" ++ MutInd.print mind ++ pr_comma () ++ int i ++ str "]" let ppwf_paths x = pp (Rtree.pp_tree prrecarg x) -let get_current_context = Vernacstate.Proof_global.get_current_context +let get_current_context () = + try Vernacstate.Proof_global.get_current_context () + with Vernacstate.Proof_global.NoCurrentProof -> + let env = Global.env() in + Evd.from_env env, env (* term printers *) let envpp pp = let sigma,env = get_current_context () in pp env sigma |
