]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/basic_rg/brg.ml
basic_rg: we improved the error reporting interface
[helm.git] / helm / software / lambda-delta / basic_rg / brg.ml
index 779a121e603042965c694c3d8f42d45bad083a7c..6a9f9fd2088b4c260e75d9ffaca19f567748d0a4 100644 (file)
@@ -39,8 +39,6 @@ type context = Null
 (* Cons: tail, relative context, binder *) 
              | Cons of context * context option * bind 
 
-type message = (context, term) Log.item list
-
 (* Currified constructors ***************************************************)
 
 let abst a w = Abst (a, w)
@@ -68,7 +66,7 @@ let push f es ?c b =
 
 let get err f es i =
    let rec aux j = function
-      | Null                            -> err i
+      | Null                            -> err ()
       | Cons (tl, None, b)   when j = 0 -> f tl b
       | Cons (_, Some c, b) when j = 0  -> f c b
       | Cons (tl, _, _)                 -> aux (pred j) tl
@@ -78,9 +76,9 @@ let get err f es i =
 let rec rev_iter f map = function   
    | Null                 -> f ()
    | Cons (tl, None, b)   -> 
-      let f () = map f tl b in rev_iter f map tl
+      let f _ = map f tl b in rev_iter f map tl
    | Cons (tl, Some c, b) -> 
-      let f () = map f c b in rev_iter f map tl
+      let f _ = map f c b in rev_iter f map tl
 
 let rec fold_left f map x = function
    | Null            -> f x