File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -734,6 +734,8 @@ type loc-modtypath modtypath -> located.
734734 In (list (pair id modtypath), " Parameters of the functor" ,
735735 Full (unit_ctx, " Starts a functor *E*" )))),
736736 (fun name mp binders ~depth _ _ state ->
737+ if Lib. sections_are_opened () then
738+ err Pp. (str" This code cannot be run within a section since it opens a module" );
737739 let ty =
738740 match mp with
739741 | None -> Declaremods. Check []
@@ -773,6 +775,8 @@ coq.env.begin-module Name MP :-
773775 In (list (pair id modtypath), " The parameters of the functor" ,
774776 Full (unit_ctx," Starts a module type functor *E*" ))),
775777 (fun name binders ~depth _ _ state ->
778+ if Lib. sections_are_opened () then
779+ err Pp. (str" This code cannot be run within a section since it opens a module" );
776780 let id = Id. of_string name in
777781 let binders_ast =
778782 List. map (fun (id , mty ) ->
You can’t perform that action at this time.
0 commit comments