]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_disambiguation/cicTextualParser2Ast.mli
- added support for implicit in concrete syntax
[helm.git] / helm / ocaml / cic_disambiguation / cicTextualParser2Ast.mli
index b7267ee573649769d09ea7498f651ac315bd4dad..849d102850966e7d80d09ba918108b2b5d1db2ce 100644 (file)
@@ -31,7 +31,7 @@ type ('term, 'ident) tactic =
   | Injection of 'ident
   | Intros of int option
   | Left
-  | LetIn of 'term * 'ident
+  | LetIn of 'term * 'ident (* TODO clashes with term below *)
   | Named_intros of 'ident list
   | Reduce of reduction_kind * 'term pattern * 'ident option (* what, where *)
   | Reflexivity
@@ -63,27 +63,31 @@ type binder_kind = [ `Lambda | `Pi | `Exists | `Forall ]
 type induction_kind = [ `Inductive | `CoInductive ]
 type sort_kind = [ `Prop | `Set | `Type | `CProp ]
 
-type case_pattern = string list
+type term_attribute =
+  [ `Loc of location  (* source file location *)
+  | `IdRef of string  (* ACic pointer *)
+  ]
 
 type term =
-  | LocatedTerm of location * term
+  | AttributedTerm of term_attribute * term
 
   | Appl of term list
-  | Appl_symbol of string * int * term list (* literal, args, instance *)
-  | Binder of binder_kind * Cic.name * term option * term
-      (* kind, name, type, body *)
+  | Appl_symbol of string * int * term list (* literal, instance, args *)
+  | Binder of binder_kind * capture_variable * term (* kind, name, body *)
   | Case of term * string * term option * (case_pattern * term) list
     (* what to match, inductive type, out type, <pattern,action> list *)
-  | LetIn of string * term * term  (* name, body, where *)
-  | LetRec of induction_kind * (string * term * term option * int) list * term
-      (* (name, body, type, decreasing argument) list, where *)
+  | LetIn of capture_variable * term * term  (* name, body, where *)
+  | LetRec of induction_kind * (capture_variable * term * int) list * term
+      (* (name, body, decreasing argument) list, where *)
   | Ident of string * subst list  (* literal, substitutions *)
   | Meta of int * meta_subst list
   | Num of string * int (* literal, instance *)
   | Sort of sort_kind
 
+and capture_variable = Cic.name * term option (* name, type *)
 and meta_subst = term option
 and subst = string * term
+and case_pattern = string * capture_variable list
 
 (*
 type cexpr =