]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/components/content/interpretations.ml
cic module removed (RIP)
[helm.git] / matita / components / content / interpretations.ml
index 599a0704ecdda7d3c3ad01430c04b1f1b8f9918f..8059eeaaecbac6f3b04497573ff788f1677c61a5 100644 (file)
@@ -27,8 +27,7 @@
 
 open Printf
 
-module Ast = CicNotationPt
-module Obj = LibraryObjects
+module Ast = NotationPt
 
 let debug = false
 let debug_print s = if debug then prerr_endline (Lazy.force s) else ()
@@ -37,26 +36,13 @@ type interpretation_id = int
 
 let idref id t = Ast.AttributedTerm (`IdRef id, t)
 
+type cic_id = string
+
 type term_info =
-  { sort: (Cic.id, Ast.sort_kind) Hashtbl.t;
-    uri: (Cic.id, UriManager.uri) Hashtbl.t;
+  { sort: (cic_id, Ast.sort_kind) Hashtbl.t;
+    uri: (cic_id, UriManager.uri) Hashtbl.t;
   }
 
-let destroy_nat annterm =
-  let is_zero = function
-    | Cic.AMutConstruct (_, uri, 0, 1, _) when Obj.is_nat_URI uri -> true
-    | _ -> false
-  in
-  let is_succ = function
-    | Cic.AMutConstruct (_, uri, 0, 2, _) when Obj.is_nat_URI uri -> true
-    | _ -> false
-  in
-  let rec aux acc = function
-    | Cic.AAppl (_, [he ; tl]) when is_succ he -> aux (acc + 1) tl
-    | t when is_zero t -> Some acc
-    | _ -> None in
-  aux 0 annterm
-
   (* persistent state *)
 
 let initial_level2_patterns32 () = Hashtbl.create 211
@@ -108,7 +94,7 @@ let instantiate32 term_info idrefs env symbol args =
         in
         let rec add_lambda t n =
           if n > 0 then
-            let name = CicNotationUtil.fresh_name () in
+            let name = NotationUtil.fresh_name () in
             Ast.Binder (`Lambda, (Ast.Ident (name, None), None),
               Ast.Appl [add_lambda t (n - 1); Ast.Ident (name, None)])
           else