From fac949450909b5ef17078f220ae809cf54ae3f08 Mon Sep 17 00:00:00 2001 From: letouzey Date: Tue, 20 Aug 2013 08:22:42 +0000 Subject: Safe_typing code refactoring - No more modinfo sub-record in the safe_environment record, this was a syntactic pain. senv.modinfo.modpath --> senv.modpath senv.modinfo.variant --> senv.modvariant senv.modinfo.resolver --> senv.modresolver senv.modinfo.resolver_of_param --> senv.paramresolver senv.modinfo.label : removed (can be inferred from modpath) - No more systematic chaining of safe_environment ('old' field). Instead, earlier safe_environment is stored in the modvariant field when necessary (STRUCT and SIG case). - Improved sharing between end_module and end_modtype - More qualified names instead of open, better comments, ... - Some user errors are now checked earlier elsewhere (see for instance vernac_end_segment), so we can turn these errors into asserts. The user error about higher-order include is now algebraic. - Highlight the idea of a state monad in Safe_typing : type 'a safe_transformer = safe_environment -> 'a * safe_environment More systematic code in Global, thanks to 'globalize' function. - Declaremods : less informations stored in openmod_info git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16708 85f007b7-540e-0410-9357-904b9bb8a0f7 --- kernel/mod_typing.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kernel/mod_typing.ml') diff --git a/kernel/mod_typing.ml b/kernel/mod_typing.ml index 67db4e806..befa822ce 100644 --- a/kernel/mod_typing.ml +++ b/kernel/mod_typing.ml @@ -353,7 +353,7 @@ let rec translate_struct_include_module_entry env mp inl = function | MSEapply (fexpr,mexpr) -> let ftrans = translate_struct_include_module_entry env mp inl fexpr in translate_apply env inl ftrans mexpr (fun _ _ _ -> None) - | _ -> error ("You cannot Include a high-order structure.") + | _ -> Modops.error_higher_order_include () let rec add_struct_expr_constraints env = function | SEBident _ -> env -- cgit v1.2.3