X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_disambiguation%2FcicTextualParser2.ml;h=9f65555a4e80c8dc999fad607b484d55df5ef9cb;hb=349a0e23813a7f33853e1f8fe48230276ac22934;hp=78d1bf181c8b99c1d14b965244eac25eacc7ebc0;hpb=d5e420ba0286d6b6ccab7101bdd75a1442385e06;p=helm.git diff --git a/helm/ocaml/cic_disambiguation/cicTextualParser2.ml b/helm/ocaml/cic_disambiguation/cicTextualParser2.ml index 78d1bf181..9f65555a4 100644 --- a/helm/ocaml/cic_disambiguation/cicTextualParser2.ml +++ b/helm/ocaml/cic_disambiguation/cicTextualParser2.ml @@ -175,9 +175,10 @@ EXTEND [ defs = LIST1 [ name = IDENT; args = LIST1 [ - PAREN "(" ; names = LIST1 IDENT SEP SYMBOL ","; SYMBOL ":"; - ty = term; PAREN ")" -> - (names, ty) + PAREN "(" ; names = LIST1 IDENT SEP SYMBOL ","; + SYMBOL ":"; ty = term; PAREN ")" -> + (names, Some ty) + | name = IDENT -> [name],None ]; index_name = OPT [ IDENT "on"; idx = IDENT -> idx ]; ty = OPT [ SYMBOL ":" ; t = term -> t ]; @@ -195,6 +196,12 @@ EXTEND list_of_binder binder ty (binder_of_arg_list binder final_term tl) l in + let args = + List.map + (function + names,Some ty -> names,ty + | names,None -> names,CicAst.Implicit + ) args in let t1' = binder_of_arg_list `Lambda t1 args in let ty' = match ty with @@ -377,8 +384,8 @@ EXTEND | [ IDENT "intro" ] -> TacticAst.Intros (loc, Some 1, []) | [ IDENT "left" ] -> TacticAst.Left loc - | [ "let" | "Let" ]; - t = tactic_term; "in"; where = IDENT -> + | [ IDENT "letin" ]; + where = IDENT ; SYMBOL <:unicode> ; t = tactic_term -> TacticAst.LetIn (loc, t, where) | kind = reduction_kind; pat = OPT [ @@ -546,8 +553,7 @@ EXTEND let name,ty = match defs with | ((Cic.Name name,Some ty),_,_) :: _ -> name,ty - | ((Cic.Name name,None),_,_) :: _ -> - fail loc ("No type given for " ^ name) + | ((Cic.Name name,None),_,_) :: _ -> name,CicAst.Implicit | _ -> assert false in let body = CicAst.Ident (name,None) in