]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/acic_content/cicNotationPt.ml
- Procedural: we now check that an eliminator opens as many goals as the ...
[helm.git] / helm / software / components / acic_content / cicNotationPt.ml
index 73eeb017dad00d781bbb61f9242b2eeb8f631186..1ca5148105e2ec90c3ce8956b3b4413351ca6016 100644 (file)
 
 type binder_kind = [ `Lambda | `Pi | `Exists | `Forall ]
 type induction_kind = [ `Inductive | `CoInductive ]
-type sort_kind = [ `Prop | `Set | `Type of CicUniv.universe | `CProp ]
+type sort_kind = [ `Prop | `Set | `Type of CicUniv.universe | `CProp of CicUniv.universe]
 type fold_kind = [ `Left | `Right ]
 
-type location = Token.flocation
+type location = Stdpp.location
 let fail floc msg =
   let (x, y) = HExtlib.loc_of_floc floc in
   failwith (Printf.sprintf "Error at characters %d - %d: %s" x y msg)
@@ -44,8 +44,7 @@ type child_pos = [ `Left | `Right | `Inner ]
 type term_attribute =
   [ `Loc of location                  (* source file location *)
   | `IdRef of string                  (* ACic pointer *)
-  | `Level of int * Gramext.g_assoc   (* precedence, associativity *)
-  | `ChildPos of child_pos            (* position of l1 pattern variables *)
+  | `Level of int
   | `XmlAttrs of (string option * string * string) list
       (* list of XML attributes: namespace, name, value *)
   | `Raw of string                    (* unparsed version *)
@@ -63,7 +62,7 @@ type 'term capture_variable = 'term * 'term option
 
 (** To be increased each time the term type below changes, used for "safe"
  * marshalling *)
-let magic = 2
+let magic = 3
 
 type term =
   (* CIC AST *)
@@ -105,7 +104,9 @@ type term =
 
 and meta_subst = term option
 and subst = string * term
-and case_pattern = string * href option * term capture_variable list
+and case_pattern =
+   Pattern of string * href option * term capture_variable list
+ | Wildcard
 
 and box_kind = H | V | HV | HOV
 and box_spec = box_kind * bool * bool (* kind, spacing, indent *)
@@ -143,7 +144,7 @@ and pattern_variable =
   (* level 1 and 2 variables *)
   | NumVar of string
   | IdentVar of string
-  | TermVar of string
+  | TermVar of string * int option
 
   (* level 1 variables *)
   | Ascription of term * string
@@ -185,8 +186,3 @@ let binder_prec = 20
 let apply_prec = 70
 let simple_prec = 90
 
-let let_in_assoc = Gramext.NonA
-let binder_assoc = Gramext.RightA
-let apply_assoc = Gramext.LeftA
-let simple_assoc = Gramext.NonA
-