From a615382472ee21e288bd7115be147415e465e897 Mon Sep 17 00:00:00 2001 From: Arnaud Spiwack Date: Mon, 16 Mar 2015 17:56:48 +0100 Subject: Declarative mode: plug the specialised printers back. It will not work in CoqIDE though, which handles printing its own way. It's a general remark that we have many ways of printing things in Coq and we should look for a unified structured framework to be shared between interfaces. --- plugins/decl_mode/decl_mode.ml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'plugins/decl_mode/decl_mode.ml') diff --git a/plugins/decl_mode/decl_mode.ml b/plugins/decl_mode/decl_mode.ml index 07df7c7f09..774c20c9ae 100644 --- a/plugins/decl_mode/decl_mode.ml +++ b/plugins/decl_mode/decl_mode.ml @@ -119,3 +119,18 @@ let get_last env = match Environ.named_context env with | (id,_,_)::_ -> id | [] -> error "no previous statement to use" + +let get_end_command pts = + match get_top_stack pts with + | [] -> "\"end proof\"" + | Claim::_ -> "\"end claim\"" + | Focus_claim::_-> "\"end focus\"" + | Suppose_case :: Per (et,_,_,_) :: _ | Per (et,_,_,_) :: _ -> + begin + match et with + Decl_expr.ET_Case_analysis -> + "\"end cases\" or start a new case" + | Decl_expr.ET_Induction -> + "\"end induction\" or start a new case" + end + | _ -> anomaly (Pp.str"lonely suppose") -- cgit v1.2.3