(************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* f ?loc x | QAnti (loc, id) -> of_variable ?loc id let of_ident ?loc id = inj_wit ?loc Stdarg.wit_ident id let of_constr ?loc c = inj_wit ?loc Stdarg.wit_constr c let of_open_constr ?loc c = inj_wit ?loc Stdarg.wit_open_constr c let of_bool ?loc b = let c = if b then Core.c_true else Core.c_false in constructor ?loc c [] let rec of_list ?loc = function | [] -> constructor Core.c_nil [] | e :: l -> constructor ?loc Core.c_cons [e; of_list ?loc l] let of_qhyp ?loc = function | AnonHyp n -> constructor Core.c_anon_hyp [of_int ?loc n] | NamedHyp id -> constructor Core.c_named_hyp [of_ident ?loc id] let of_bindings ?loc = function | QNoBindings -> std_constructor ?loc "NoBindings" [] | QImplicitBindings tl -> std_constructor ?loc "ImplicitBindings" [of_list ?loc tl] | QExplicitBindings tl -> let tl = List.map (fun (loc, (qhyp, e)) -> of_pair ?loc (of_anti ?loc of_qhyp qhyp, e)) tl in std_constructor ?loc "ExplicitBindings" [of_list ?loc tl] let rec of_intro_pattern ?loc = function | QIntroForthcoming b -> std_constructor ?loc "IntroForthcoming" [of_bool b] | QIntroNaming iname -> std_constructor ?loc "IntroNaming" [of_intro_pattern_naming iname] | QIntroAction iact -> std_constructor ?loc "IntroAction" [of_intro_pattern_action iact] and of_intro_pattern_naming ?loc = function | QIntroIdentifier id -> std_constructor ?loc "IntroIdentifier" [of_anti ?loc of_ident id] | QIntroFresh id -> std_constructor ?loc "IntroFresh" [of_anti ?loc of_ident id] | QIntroAnonymous -> std_constructor ?loc "IntroAnonymous" [] and of_intro_pattern_action ?loc = function | QIntroWildcard -> std_constructor ?loc "IntroWildcard" [] | QIntroOrAndPattern pat -> std_constructor ?loc "IntroOrAndPattern" [of_or_and_intro_pattern ?loc pat] | QIntroInjection il -> std_constructor ?loc "IntroInjection" [of_intro_patterns ?loc il] | QIntroRewrite b -> std_constructor ?loc "IntroRewrite" [of_bool ?loc b] and of_or_and_intro_pattern ?loc = function | QIntroOrPattern ill -> let ill = List.map (of_intro_patterns ?loc) ill in std_constructor ?loc "IntroOrPattern" [of_list ?loc ill] | QIntroAndPattern il -> std_constructor ?loc "IntroAndPattern" [of_intro_patterns ?loc il] and of_intro_patterns ?loc l = of_list ?loc (List.map (of_intro_pattern ?loc) l)