From 2ff72589e5c90a25b315922b5ba2d7c11698adef Mon Sep 17 00:00:00 2001 From: letouzey Date: Mon, 5 Nov 2001 08:31:01 +0000 Subject: message non barbare si extraction dans une section git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2157 85f007b7-540e-0410-9357-904b9bb8a0f7 --- contrib/extraction/extraction.ml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/contrib/extraction/extraction.ml b/contrib/extraction/extraction.ml index 974a47a59..5e7fadd8e 100644 --- a/contrib/extraction/extraction.ml +++ b/contrib/extraction/extraction.ml @@ -252,6 +252,10 @@ let axiom_message sp = [< 'sTR "You must specify an extraction for axiom"; 'sPC; pr_sp sp; 'sPC; 'sTR "first" >] +let section_message () = + errorlabstrm "section_message" + [< 'sTR "You can't extract within a section. Close it and try again" >] + (*s Tables to keep the extraction of inductive types and constructors. *) type inductive_extraction_result = @@ -386,6 +390,7 @@ and extract_type_rec_info env c vl args = new flexible type variable. *) | IsCast (c, _) -> extract_type_rec_info env c vl args + | IsVar _ -> section_message () | _ -> assert false @@ -531,8 +536,10 @@ and extract_term_info_with_type env ctx c t = extract_fix env ctx i recd | IsCast (c, _) -> extract_term_info_with_type env ctx c t - | IsMutInd _ | IsProd _ | IsSort _ | IsVar _ | IsMeta _ | IsEvar _ -> + | IsMutInd _ | IsProd _ | IsSort _ | IsMeta _ | IsEvar _ -> assert false + | IsVar _ -> section_message () + (* Abstraction of an inductive constructor: \begin{itemize} -- cgit v1.2.3