From 575da16f72ac125ba7e50b1bfe63302dee639973 Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Fri, 13 May 2016 18:19:15 +0200 Subject: Adding a local type-in-type flag in kernel declarations. --- library/global.ml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'library/global.ml') diff --git a/library/global.ml b/library/global.ml index f4ee62b6e..e456841f8 100644 --- a/library/global.ml +++ b/library/global.ml @@ -244,6 +244,14 @@ let is_template_polymorphic r = | IndRef ind -> Environ.template_polymorphic_ind ind env | ConstructRef cstr -> Environ.template_polymorphic_ind (inductive_of_constructor cstr) env +let is_type_in_type r = + let env = env() in + match r with + | VarRef id -> false + | ConstRef c -> Environ.type_in_type_constant c env + | IndRef ind -> Environ.type_in_type_ind ind env + | ConstructRef cstr -> Environ.type_in_type_ind (inductive_of_constructor cstr) env + let current_dirpath () = Safe_typing.current_dirpath (safe_env ()) -- cgit v1.2.3