]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/grafite/grafiteAst.ml
unification hints almost ready
[helm.git] / helm / software / components / grafite / grafiteAst.ml
index 2290c4d0ba05cc8483f7cce957e059731cbe990b..d114d9322785ec15cba42c1ce1c010b26bb3c62e 100644 (file)
@@ -63,6 +63,8 @@ type ('term, 'lazy_term, 'reduction, 'ident) tactic =
   (* Real tactics *)
   | Absurd of loc * 'term
   | Apply of loc * 'term
+  | ApplyRule 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
@@ -131,7 +133,7 @@ type print_kind = [ `Env | `Coer ]
 type presentation_style = Declarative
                         | Procedural of int option
 
-type 'term macro = 
+type ('term,'lazy_term) macro = 
   (* Whelp's stuff *)
   | WHint of loc * 'term
   | WMatch of loc * 'term 
@@ -139,20 +141,23 @@ type 'term macro =
   | WLocate of loc * string
   | WElim of loc * 'term
   (* real macros *)
+  | Eval of loc * 'lazy_term reduction * 'term
   | Check of loc * 'term 
   | Hint of loc * bool
   | AutoInteractive of loc * 'term auto_params
-  | Inline of loc * presentation_style * string * string 
-     (* URI or base-uri, name prefix *) 
+  | Inline of loc * presentation_style * string * string * Cic.object_flavour option
+     (* URI or base-uri, name prefix, flavour *) 
 
 (** To be increased each time the command type below changes, used for "safe"
  * marshalling *)
-let magic = 12
+let magic = 16
 
 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 *)
+  | PreferCoercion of loc * 'term
+  | UnificationHint of loc * 'term * int (* term, precedence *)
   | Default of loc * string * UriManager.uri list
   | Drop of loc
   | Include of loc * string
@@ -179,7 +184,7 @@ type ('term,'lazy_term,'reduction,'ident) non_punctuation_tactical =
 
 type ('term, 'lazy_term, 'reduction, 'obj, 'ident) code =
   | Command of loc * ('term, 'obj) command
-  | Macro of loc * 'term macro 
+  | Macro of loc * ('term,'lazy_term) macro 
   | Tactic of loc * ('term, 'lazy_term, 'reduction, 'ident) tactic option
       * ('term, 'lazy_term, 'reduction, 'ident) punctuation_tactical
   | NonPunctuationTactical of loc