X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=ocaml%2Fparser.ml;h=6bcb70d909fd0b6117292aa2cdcb3b9a7d88da0f;hb=5682bf463b89edb7756020fe7b838eb846d6c771;hp=4b02b121e93faf1da7d2c24bdcda32af5b844929;hpb=1fdb461d0bc4056ade8a05c482142984dbda735c;p=fireball-separation.git diff --git a/ocaml/parser.ml b/ocaml/parser.ml index 4b02b12..6bcb70d 100644 --- a/ocaml/parser.ml +++ b/ocaml/parser.ml @@ -189,7 +189,7 @@ let problem_of_string s = | #nf_nob as t -> t | `Bottom -> raise (ParsingError "Input term not in normal form") in let rec aux_nob lev : nf_nob -> nf = function - | `I((n,_), args) -> `I((n,1 + Listx.length args), Listx.map (fun t -> exclude_bottom (aux_nob lev t)) args) + | `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) | `Var(n,_) -> fix lev n | `Lam(_,t) -> `Lam (true, aux (lev+1) t) | `Match _ | `N _ -> assert false