]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/grafite/grafiteAst.ml
metavariable context has a separator now
[helm.git] / helm / software / components / grafite / grafiteAst.ml
index 5668b3cba14ffae959ef58c39c5f041cf2d624e5..5cc66743d7bdffa4ab8de2de7b8b3465ea3c169c 100644 (file)
@@ -42,6 +42,10 @@ type 'ident intros_spec = int option * 'ident option list
 
 type 'term auto_params = 'term list * (string*string) list
 
+type 'term just =
+ [ `Term of 'term
+ | `Auto of 'term auto_params ]
+
 type ('term, 'lazy_term, 'reduction, 'ident) tactic =
   (* Higher order tactics (i.e. tacticals) *)
   | Do of loc * int * ('term, 'lazy_term, 'reduction, 'ident) tactic
@@ -59,10 +63,12 @@ type ('term, 'lazy_term, 'reduction, 'ident) tactic =
   (* Real tactics *)
   | Absurd of loc * 'term
   | Apply of loc * 'term
+  | ApplyP of loc * 'term (* apply for procedural reconstruction *)
   | ApplyS of loc * 'term * 'term auto_params
   | Assumption of loc
   | AutoBatch of loc * 'term auto_params
-  | Cases of loc * 'term * 'ident intros_spec
+  | Cases of loc * 'term * ('term, 'lazy_term, 'ident) pattern *
+             'ident intros_spec
   | Change of loc * ('term, 'lazy_term, 'ident) pattern * 'lazy_term
   | Clear of loc * 'ident list
   | ClearBody of loc * 'ident
@@ -102,16 +108,17 @@ type ('term, 'lazy_term, 'reduction, 'ident) tactic =
   (* Declarative language *)
   | Assume of loc * 'ident * 'term
   | Suppose of loc * 'term *'ident * 'term option
-  | By_term_we_proved of loc *'term option * 'term * 'ident option * 'term option
+  | By_just_we_proved of loc * 'term just *
+     'term * 'ident option * 'term option
   | We_need_to_prove of loc * 'term * 'ident option * 'term option
-  | Bydone of loc * 'term option 
+  | Bydone of loc * 'term just
   | We_proceed_by_induction_on of loc * 'term * 'term
   | We_proceed_by_cases_on of loc * 'term * 'term
   | Byinduction of loc * 'term * 'ident
   | Thesisbecomes of loc * 'term
   | Case of loc * string * (string * 'term) list 
-  | ExistsElim of loc * 'term option * 'ident * 'term * 'ident * 'lazy_term
-  | AndElim of loc * 'term * 'ident * 'term * 'ident * 'term
+  | ExistsElim of loc * 'term just * 'ident * 'term * 'ident * 'lazy_term
+  | AndElim of loc * 'term just * 'ident * 'term * 'ident * 'term
   | RewritingStep of
      loc * (string option * 'term) option * 'term  *
       [ `Term of 'term | `Auto of 'term auto_params
@@ -141,11 +148,11 @@ type 'term macro =
 
 (** To be increased each time the command type below changes, used for "safe"
  * marshalling *)
-let magic = 12
+let magic = 13
 
 type ('term,'obj) command =
   | Index of loc * 'term option (* key *) * UriManager.uri (* value *)
-  | Coercion of loc * UriManager.uri * bool (* add_obj *) *
+  | Coercion of loc * 'term * bool (* add_obj *) *
      int (* arity *) * int (* saturations *)
   | Default of loc * string * UriManager.uri list
   | Drop of loc