12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182(************************************************************************)(* * The Coq Proof Assistant / The Coq Development Team *)(* v * Copyright INRIA, CNRS and contributors *)(* <O___,, * (see version control and CREDITS file for authors & dates) *)(* \VV/ **************************************************************)(* // * This file is distributed under the terms of the *)(* * GNU Lesser General Public License Version 2.1 *)(* * (see LICENSE file for the text of the license) *)(************************************************************************)(** Reduction expressions *)(** The parsing produces initially a list of [red_atom] *)type'ared_atom=|FBeta|FMatch|FFix|FCofix|FZeta|FConstof'alist|FDeltaButof'alist(** This list of atoms is immediately converted to a [glob_red_flag] *)type'aglob_red_flag={rBeta:bool;rMatch:bool;rFix:bool;rCofix:bool;rZeta:bool;rDelta:bool;(** true = delta all but rConst; false = delta only on rConst*)rConst:'alist}(** Generic kinds of reductions *)type('a,'b,'c,'flags)red_expr_gen0=|Redofbool|Hnf|Simplof'flags*('b,'c)Util.unionLocus.with_occurrencesoption|Cbvof'flags|Cbnof'flags|Lazyof'flags|Unfoldof'bLocus.with_occurrenceslist|Foldof'alist|Patternof'aLocus.with_occurrenceslist|ExtraRedExprofstring|CbvVmof('b,'c)Util.unionLocus.with_occurrencesoption|CbvNativeof('b,'c)Util.unionLocus.with_occurrencesoptiontype('a,'b,'c)red_expr_gen=('a,'b,'c,'bglob_red_flag)red_expr_gen0type('a,'b,'c)may_eval=|ConstrTermof'a|ConstrEvalof('a,'b,'c)red_expr_gen*'a|ConstrContextofNames.lident*'a|ConstrTypeOfof'aopenLibnamesopenConstrexprtyper_trm=constr_exprtyper_pat=constr_pattern_exprtyper_cst=qualidor_by_notationtyperaw_red_expr=(r_trm,r_cst,r_pat)red_expr_genletmake0?dynname=letwit=Genarg.make0nameinlet()=Geninterp.register_val0witdyninwittype'aand_short_name='a*Names.lidentoptionletwit_red_expr:((constr_expr,qualidor_by_notation,constr_expr)red_expr_gen,(Genintern.glob_constr_and_expr,Tacred.evaluable_global_referenceand_short_nameLocus.or_var,Genintern.glob_constr_pattern_and_expr)red_expr_gen,(EConstr.t,Tacred.evaluable_global_reference,Pattern.constr_pattern)red_expr_gen)Genarg.genarg_type=make0"redexpr"