diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2008-11-05 17:50:56 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2008-11-05 17:50:56 +0000 |
commit | c7a38bc3775f6d29af4c2ea31fdec81725ff6ecc (patch) | |
tree | 462d2864ac4634ef9d069dc7348c31067fdade1d | |
parent | 1cb572f1fa6fde893cad7a65a308b1e2409907c1 (diff) |
Suite commit 11539 sur notation Record dans (Co)Inductive (MAJ
contrib/interface avec Arnaud)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11541 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r-- | contrib/interface/name_to_ast.ml | 2 | ||||
-rw-r--r-- | contrib/interface/xlate.ml | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/contrib/interface/name_to_ast.ml b/contrib/interface/name_to_ast.ml index 6b17e7396..7ee38fc23 100644 --- a/contrib/interface/name_to_ast.ml +++ b/contrib/interface/name_to_ast.ml @@ -110,7 +110,7 @@ let convert_one_inductive sp tyi = (((dummy_loc,basename sp), convert_env(List.rev params), (extern_constr true envpar arity), - convert_constructors envpar cstrnames cstrtypes), None);; + Constructors (convert_constructors envpar cstrnames cstrtypes)), None);; (* This function converts a Mutual inductive definition to a Coqast.t. It is obtained directly from print_mutual in pretty.ml. However, all diff --git a/contrib/interface/xlate.ml b/contrib/interface/xlate.ml index 26b9be870..2b6f681f1 100644 --- a/contrib/interface/xlate.ml +++ b/contrib/interface/xlate.ml @@ -1983,11 +1983,13 @@ let rec xlate_vernac = build_record_field_list field_list) | VernacInductive (isind, lmi) -> let co_or_ind = if isind then "Inductive" else "CoInductive" in - let strip_mutind (((_,s), parameters, c, constructors), notopt) = + let strip_mutind = function + (((_,s), parameters, c, Constructors constructors), notopt) -> CT_ind_spec (xlate_ident s, xlate_binder_list parameters, xlate_formula c, build_constructors constructors, - translate_opt_notation_decl notopt) in + translate_opt_notation_decl notopt) + | _ -> xlate_error "TODO: Record notation in (Co)Inductive" in CT_mind_decl (CT_co_ind co_or_ind, CT_ind_spec_list (List.map strip_mutind lmi)) | VernacFixpoint ([],_) -> xlate_error "mutual recursive" |