in
let context =
List.map
- (function (_,n,_) -> n)
+ (function
+ ProofEngine.Definition (n,_)
+ | ProofEngine.Declaration (n,_) -> n)
(match !ProofEngine.goal with
None -> assert false
| Some (_,(ctx,_)) -> ctx
in
let context =
List.map
- (function (_,n,_) -> n)
+ (function
+ ProofEngine.Definition (n,_)
+ | ProofEngine.Declaration (n,_) -> n)
(match !ProofEngine.goal with
None -> assert false
| Some (_,(ctx,_)) -> ctx
let change rendering_window =
call_tactic_with_input_and_goal_input ProofEngine.change rendering_window
;;
+let letin rendering_window =
+ call_tactic_with_input ProofEngine.letin rendering_window
+;;
let whd_in_scratch scratch_window =
None -> []
| Some (_,(ctx,_)) -> ctx
in
- ProofEngine.cic_context_of_context context,
- List.map (function (_,n,_) -> n) context
+ ProofEngine.cic_context_of_named_context context,
+ List.map
+ (function
+ ProofEngine.Declaration (n,_)
+ | ProofEngine.Definition (n,_) -> n
+ ) context
in
(* Do something interesting *)
let lexbuf = Lexing.from_string input in
let changeb =
GButton.button ~label:"Change"
~packing:(hbox3#pack ~expand:false ~fill:false ~padding:5) () in
+ let letinb =
+ GButton.button ~label:"Let ... In"
+ ~packing:(hbox3#pack ~expand:false ~fill:false ~padding:5) () in
let outputhtml =
GHtml.xmhtml
~source:"<html><body bgColor=\"white\"></body></html>"
ignore(foldb#connect#clicked (fold self)) ;
ignore(cutb#connect#clicked (cut self)) ;
ignore(changeb#connect#clicked (change self)) ;
+ ignore(letinb#connect#clicked (letin self)) ;
ignore(introsb#connect#clicked (intros self)) ;
Logger.log_callback :=
(Logger.log_to_html ~print_and_flush:(output_html outputhtml))