package coq-core

  1. Overview
  2. Docs
On This Page
  1. Patterns
Legend:
Library
Module
Module type
Parameter
Class
Class type
Patterns
type patvar = Names.Id.t

Cases pattern variables

type case_info_pattern = {
  1. cip_style : Constr.case_style;
  2. cip_ind : Names.inductive option;
  3. cip_extensible : bool;
    (*

    does this match end with _ => _ ?

    *)
}
type 'i uninstantiated_pattern =
  1. | PGenarg : Genarg.glob_generic_argument -> [ `uninstantiated ] uninstantiated_pattern
type 'i constr_pattern_r =
  1. | PRef of Names.GlobRef.t
  2. | PVar of Names.Id.t
  3. | PEvar of Evar.t * 'i constr_pattern_r list
  4. | PRel of int
  5. | PApp of 'i constr_pattern_r * 'i constr_pattern_r array
  6. | PSoApp of patvar * 'i constr_pattern_r list
  7. | PProj of Names.Projection.t * 'i constr_pattern_r
  8. | PLambda of Names.Name.t * 'i constr_pattern_r * 'i constr_pattern_r
  9. | PProd of Names.Name.t * 'i constr_pattern_r * 'i constr_pattern_r
  10. | PLetIn of Names.Name.t * 'i constr_pattern_r * 'i constr_pattern_r option * 'i constr_pattern_r
  11. | PSort of Sorts.family
  12. | PMeta of patvar option
  13. | PIf of 'i constr_pattern_r * 'i constr_pattern_r * 'i constr_pattern_r
  14. | PCase of case_info_pattern * (Names.Name.t array * 'i constr_pattern_r) option * 'i constr_pattern_r * (int * Names.Name.t array * 'i constr_pattern_r) list
    (*

    index of constructor, nb of args

    *)
  15. | PFix of int array * int * Names.Name.t array * 'i constr_pattern_r array * 'i constr_pattern_r array
  16. | PCoFix of int * Names.Name.t array * 'i constr_pattern_r array * 'i constr_pattern_r array
  17. | PInt of Uint63.t
  18. | PFloat of Float64.t
  19. | PArray of 'i constr_pattern_r array * 'i constr_pattern_r * 'i constr_pattern_r
  20. | PUninstantiated of 'i uninstantiated_pattern
type constr_pattern = [ `any ] constr_pattern_r

Nota : in a PCase, the array of branches might be shorter than expected, denoting the use of a final "_ => _" branch

type _ pattern_kind =
  1. | Any
  2. | Uninstantiated : [ `uninstantiated ] pattern_kind
OCaml

Innovation. Community. Security.