From c7a38bc3775f6d29af4c2ea31fdec81725ff6ecc Mon Sep 17 00:00:00 2001 From: herbelin Date: Wed, 5 Nov 2008 17:50:56 +0000 Subject: 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 --- contrib/interface/name_to_ast.ml | 2 +- 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 6b17e7396a..7ee38fc230 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 26b9be8707..2b6f681f12 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" -- cgit v1.2.3