]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/components/binaries/probe/nCicScan.ml
probe
[helm.git] / matita / components / binaries / probe / nCicScan.ml
index 5b0a106051279fceb94563605f7726c1a37db811..736baafbcc4e67546d7ab09deab874a5473fa487 100644 (file)
@@ -19,6 +19,7 @@ module P  = NCicPp
 module E  = NCicEnvironment
 
 module O  = Options
+module X  = Error
 
 type status = {
 (* current complexity *)
@@ -29,9 +30,6 @@ type status = {
 
 let status = new P.status
 
-let malformed () =
-  failwith "probe: malformed term"
-
 let add_name str =
   let u = U.uri_of_string str in
   if US.mem u !O.names then Printf.eprintf "probe: name clash: %S\n" str;
@@ -86,7 +84,7 @@ let rec scan_term st = function
   | (_, C.Sort _)                :: tl -> scan_term (inc st) tl
   | (c, C.Rel i)                 :: tl -> scan_term (scan_lref st c i) tl
   | (_, C.Const p)               :: tl -> scan_term (scan_gref st p) tl
-  | (_, C.Appl [])               :: tl -> malformed ()
+  | (_, C.Appl [])               :: tl -> X.malformed ()
   | (c, C.Appl ts)               :: tl ->
     scan_term (add st (pred (L.length ts))) (set_list c ts tl)
   | (c, C.Match (_, t0, t1, ts)) :: tl ->