X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Facic_content%2FcicNotationUtil.ml;h=51acf758f080d427cb43ff4370a00b0c63eba833;hb=0bfad3f438ba29135f2c18d1bf3cb0c8f462a205;hp=f331b79ca8d2da4c3a545c54b6789dcb1eb59a7b;hpb=774c8d18f41e71ae7e26a90d726d10a6f95de1fe;p=helm.git diff --git a/helm/software/components/acic_content/cicNotationUtil.ml b/helm/software/components/acic_content/cicNotationUtil.ml index f331b79ca..51acf758f 100644 --- a/helm/software/components/acic_content/cicNotationUtil.ml +++ b/helm/software/components/acic_content/cicNotationUtil.ml @@ -35,8 +35,8 @@ let visit_ast ?(special_k = fun _ -> assert false) k = | Ast.Case (term, indtype, typ, patterns) -> Ast.Case (k term, indtype, aux_opt typ, aux_patterns patterns) | Ast.Cast (t1, t2) -> Ast.Cast (k t1, k t2) - | Ast.LetIn (var, t1, t2) -> - Ast.LetIn (aux_capture_variable var, k t1, k t2) + | Ast.LetIn (var, t1, t3) -> + Ast.LetIn (aux_capture_variable var, k t1, k t3) | Ast.LetRec (kind, definitions, term) -> let definitions = List.map @@ -67,8 +67,11 @@ let visit_ast ?(special_k = fun _ -> assert false) k = | Some term -> Some (k term) and aux_capture_variable (term, typ_opt) = k term, aux_opt typ_opt and aux_patterns patterns = List.map aux_pattern patterns - and aux_pattern ((head, hrefs, vars), term) = - ((head, hrefs, List.map aux_capture_variable vars), k term) + and aux_pattern = + function + Ast.Pattern (head, hrefs, vars), term -> + Ast.Pattern (head, hrefs, List.map aux_capture_variable vars), k term + | Ast.Wildcard, term -> Ast.Wildcard, k term and aux_subst (name, term) = (name, k term) and aux_substs substs = List.map aux_subst substs in @@ -184,9 +187,9 @@ let meta_names_of_term term = aux term ; aux_opt outty_opt ; List.iter aux_branch patterns - | Ast.LetIn (_, t1, t2) -> + | Ast.LetIn (_, t1, t3) -> aux t1 ; - aux t2 + aux t3 | Ast.LetRec (_, definitions, body) -> List.iter aux_definition definitions ; aux body @@ -213,8 +216,10 @@ let meta_names_of_term term = and aux_branch (pattern, term) = aux_pattern pattern ; aux term - and aux_pattern (head, _, vars) = - List.iter aux_capture_var vars + and aux_pattern = + function + Ast.Pattern (head, _, vars) -> List.iter aux_capture_var vars + | Ast.Wildcard -> () and aux_definition (params, var, term, decrno) = List.iter aux_capture_var params ; aux_capture_var var ;