]> matita.cs.unibo.it Git - fireball-separation.git/blobdiff - ocaml/num.ml
Bug fixed in pretty-printing of original names under lambdas
[fireball-separation.git] / ocaml / num.ml
index 66bdd8598f0d3ced253a46bce4d66ac2088080bd..e7b6290fc64afb7efb7212ac1bc0536067c3a3ab 100644 (file)
@@ -118,7 +118,7 @@ let rec string_of_term =
  let boundvar x = "v" ^ string_of_int x in
  let varname lev l n =
   if n < lev then boundvar (lev-n-1)
-   else if n < List.length l then List.nth l (n-lev)
+   else if n - lev < List.length l then List.nth l (n-lev)
     else "`" ^ string_of_int (n-lev) in
  let rec string_of_term_w_pars lev l  = function
   | `Var(n,ar) -> varname lev l n ^ (if debug_display_arities then ":" ^ string_of_int ar else "")