]> matita.cs.unibo.it Git - fireball-separation.git/blobdiff - ocaml/parser.ml
Fixed computation of arity for top-level inerts
[fireball-separation.git] / ocaml / parser.ml
index 4b02b121e93faf1da7d2c24bdcda32af5b844929..6bcb70d909fd0b6117292aa2cdcb3b9a7d88da0f 100644 (file)
@@ -189,7 +189,7 @@ let problem_of_string s =
  | #nf_nob as t -> t\r
  | `Bottom -> raise (ParsingError "Input term not in normal form") in\r
  let rec aux_nob lev : nf_nob -> nf = function\r
- | `I((n,_), args) -> `I((n,1 + Listx.length args), Listx.map (fun t -> exclude_bottom (aux_nob lev t)) args)\r
+ | `I((n,_), args) -> `I((n,(if lev = 0 then 0 else 1) + Listx.length args), Listx.map (fun t -> exclude_bottom (aux_nob lev t)) args)\r
  | `Var(n,_) -> fix lev n\r
  | `Lam(_,t) -> `Lam (true, aux (lev+1) t)\r
  | `Match _ | `N _ -> assert false\r