(************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* ('a list,'co,'ta) abstract_argument_type val wit_list1 : ('a,'co,'ta) abstract_argument_type -> ('a list,'co,'ta) abstract_argument_type val wit_opt : ('a,'co,'ta) abstract_argument_type -> ('a option,'co,'ta) abstract_argument_type val wit_pair : ('a,'co,'ta) abstract_argument_type -> ('b,'co,'ta) abstract_argument_type -> ('a * 'b,'co,'ta) abstract_argument_type (* 'a generic_argument = (Sigma t:type. t[constr/'a]) *) type ('a,'b) generic_argument val fold_list0 : (('a,'b) generic_argument -> 'c -> 'c) -> ('a,'b) generic_argument -> 'c -> 'c val fold_list1 : (('a,'b) generic_argument -> 'c -> 'c) -> ('a,'b) generic_argument -> 'c -> 'c val fold_opt : (('a,'b) generic_argument -> 'c) -> 'c -> ('a,'b) generic_argument -> 'c val fold_pair : (('a,'b) generic_argument -> ('a,'b) generic_argument -> 'c) -> ('a,'b) generic_argument -> 'c (* [app_list0] fails if applied to an argument not of tag [List0 t] for some [t]; it's the responsability of the caller to ensure it *) val app_list0 : (('a,'b) generic_argument -> ('c,'d) generic_argument) -> ('a,'b) generic_argument -> ('c,'d) generic_argument val app_list1 : (('a,'b) generic_argument -> ('c,'d) generic_argument) -> ('a,'b) generic_argument -> ('c,'d) generic_argument val app_opt : (('a,'b) generic_argument -> ('c,'d) generic_argument) -> ('a,'b) generic_argument -> ('c,'d) generic_argument val app_pair : (('a,'b) generic_argument -> ('c,'d) generic_argument) -> (('a,'b) generic_argument -> ('c,'d) generic_argument) -> ('a,'b) generic_argument -> ('c,'d) generic_argument (* Manque l'ordre supérieur, on aimerait ('co,'ta) 'a; manque aussi le polymorphism, on aimerait que 'b et 'c restent polymorphes à l'appel de create *) val create_arg : string -> ('a,'co,'ta) abstract_argument_type * ('globa,'globco,'globta) abstract_argument_type * ('rawa,'rawco,'rawta) abstract_argument_type val exists_argtype : string -> bool type argument_type = (* Basic types *) | BoolArgType | IntArgType | IntOrVarArgType | StringArgType | PreIdentArgType | IntroPatternArgType | IdentArgType | HypArgType | RefArgType (* Specific types *) | SortArgType | ConstrArgType | ConstrMayEvalArgType | QuantHypArgType | TacticArgType | CastedOpenConstrArgType | ConstrWithBindingsArgType | BindingsArgType | RedExprArgType | List0ArgType of argument_type | List1ArgType of argument_type | OptArgType of argument_type | PairArgType of argument_type * argument_type | ExtraArgType of string val genarg_tag : ('a,'b) generic_argument -> argument_type val unquote : ('a,'co,'ta) abstract_argument_type -> argument_type (* We'd like [in_generic: !b:type, !a:argument_type -> (f a) -> b generic_argument] with f a = b if a is Constr, f a = c if a is Tactic, otherwise f a = |a| in_generic is not typable; we replace the second argument by an absurd type (with no introduction rule) *) type an_arg_of_this_type val in_generic : argument_type -> an_arg_of_this_type -> ('a,'b) generic_argument val in_gen : ('a,'co,'ta) abstract_argument_type -> 'a -> ('co,'ta) generic_argument val out_gen : ('a,'co,'ta) abstract_argument_type -> ('co,'ta) generic_argument -> 'a