]> matita.cs.unibo.it Git - fireball-separation.git/commitdiff
Bug fixed in pretty-printing of original names under lambdas
authoracondolu <andrea.condoluci@unibo.it>
Tue, 25 Jul 2017 14:57:26 +0000 (16:57 +0200)
committeracondolu <andrea.condoluci@unibo.it>
Tue, 25 Jul 2017 14:57:26 +0000 (16:57 +0200)
ocaml/num.ml

index 485b56ea61a783ab3984e61a2b44b4222af368bd..189d0f2c7a440b59b791de5306294008ca07d935 100644 (file)
@@ -122,7 +122,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 "")