From 9e75cacd86d491f81da7171c72569ac0cb6aeae0 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 26 Feb 2018 08:54:58 +0000 Subject: [vernac] attribute_of_flags Elaborate a [atts] record out of a list of flags. --- stm/vernac_classifier.ml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'stm') diff --git a/stm/vernac_classifier.ml b/stm/vernac_classifier.ml index e01dcbcb6e..0606d27ed5 100644 --- a/stm/vernac_classifier.ml +++ b/stm/vernac_classifier.ml @@ -199,11 +199,8 @@ let classify_vernac e = in let rec static_control_classifier ~poly = function | VernacExpr (f, e) -> - let poly = List.fold_left (fun poly f -> - match f with - | VernacPolymorphic b -> b - | (VernacProgram | VernacLocal _) -> poly - ) poly f in + let _, atts = Vernacentries.attributes_of_flags f Vernacinterp.{ loc = None ; locality = None ; polymorphic = poly ; program = false } in + let poly = atts.Vernacinterp.polymorphic in static_classifier ~poly e | VernacTimeout (_,e) -> static_control_classifier ~poly e | VernacTime (_,{v=e}) | VernacRedirect (_, {v=e}) -> -- cgit v1.2.3 From fb9755ab4445fd86cdfc5b249b487629591d87a0 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 31 May 2018 09:14:47 +0000 Subject: [vernac] mk_atts: an atts record with default values --- stm/vernac_classifier.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stm') diff --git a/stm/vernac_classifier.ml b/stm/vernac_classifier.ml index 0606d27ed5..6be80d29a5 100644 --- a/stm/vernac_classifier.ml +++ b/stm/vernac_classifier.ml @@ -199,7 +199,7 @@ let classify_vernac e = in let rec static_control_classifier ~poly = function | VernacExpr (f, e) -> - let _, atts = Vernacentries.attributes_of_flags f Vernacinterp.{ loc = None ; locality = None ; polymorphic = poly ; program = false } in + let _, atts = Vernacentries.attributes_of_flags f Vernacinterp.(mk_atts ~polymorphic:poly ()) in let poly = atts.Vernacinterp.polymorphic in static_classifier ~poly e | VernacTimeout (_,e) -> static_control_classifier ~poly e -- cgit v1.2.3