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 constr_pattern =
  1. | PRef of Names.GlobRef.t
  2. | PVar of Names.Id.t
  3. | PEvar of Evar.t * constr_pattern list
  4. | PRel of int
  5. | PApp of constr_pattern * constr_pattern array
  6. | PSoApp of patvar * constr_pattern list
  7. | PProj of Names.Projection.t * constr_pattern
  8. | PLambda of Names.Name.t * constr_pattern * constr_pattern
  9. | PProd of Names.Name.t * constr_pattern * constr_pattern
  10. | PLetIn of Names.Name.t * constr_pattern * constr_pattern option * constr_pattern
  11. | PSort of Sorts.family
  12. | PMeta of patvar option
  13. | PIf of constr_pattern * constr_pattern * constr_pattern
  14. | PCase of case_info_pattern * (Names.Name.t array * constr_pattern) option * constr_pattern * (int * Names.Name.t array * constr_pattern) list
    (*

    index of constructor, nb of args

    *)
  15. | PFix of int array * int * Names.Name.t array * constr_pattern array * constr_pattern array
  16. | PCoFix of int * Names.Name.t array * constr_pattern array * constr_pattern array
  17. | PInt of Uint63.t
  18. | PFloat of Float64.t
  19. | PArray of constr_pattern array * constr_pattern * constr_pattern

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

OCaml

Innovation. Community. Security.