package pattern

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type pattern = Parsetree.pattern
and expression = Parsetree.expression
and mismatch = {
  1. ident : string;
  2. expected : pattern;
  3. got : expression option;
}
and failure = {
  1. common : pattern;
  2. mismatches : mismatch list;
}
type pattern__arity = [
  1. | `Zero
]
and pattern__structure = [
  1. | `Name of [ `Attributes of [ `Opaque of [ `Zero ] ] ]
]
and expression__arity = [
  1. | `Zero
]
and expression__structure = [
  1. | `Name of [ `Attributes of [ `Opaque of [ `Zero ] ] ]
]
and mismatch__arity = [
  1. | `Zero
]
and mismatch__structure = [
  1. | `Name of [ `Record of [ `Mono of [ `Builtin of [ `String ] ] ] * ([ `Mono of [ `SubGADT of [ `Rec of [ `Zero of [ `Zero of [ `Start ] ] ] ] ] ] * ([ `Mono of [ `Apply of [ `SubGADT of [ `RecGroup of Refl.Builtins.option__structure * Refl.Builtins.option__rec_group ] ] * ([ `SubGADT of [ `Rec of [ `Zero of [ `One of [ `Start ] ] ] ] ] * unit) * (([ `Present ], [ `Absent ]) Refl.Builtins.option__variable_positive0 * unit) * (([ `Present ], [ `Absent ]) Refl.Builtins.option__variable_negative0 * unit) * (([ `Present ], [ `Absent ]) Refl.Builtins.option__variable_direct0 * unit) * ((unit * unit * unit) * unit) ] ] * unit)) ]
]
and failure__arity = [
  1. | `Zero
]
and failure__structure = [
  1. | `Name of [ `Record of [ `Mono of [ `SubGADT of [ `Rec of [ `Zero of [ `Zero of [ `Start ] ] ] ] ] ] * ([ `Mono of [ `Apply of [ `SubGADT of [ `RecGroup of Refl.Builtins.list__structure * Refl.Builtins.list__rec_group ] ] * ([ `SubGADT of [ `Rec of [ `One of [ `Zero of [ `Start ] ] ] ] ] * unit) * (([ `Present ], [ `Absent ]) Refl.Builtins.list__variable_positive0 * unit) * (([ `Present ], [ `Absent ]) Refl.Builtins.list__variable_negative0 * unit) * (([ `Present ], [ `Absent ]) Refl.Builtins.list__variable_direct0 * unit) * ((unit * unit * unit) * unit) ] ] * unit) ]
]
and pattern__kinds = [
  1. | `Opaque
]
and pattern__gadt = Parsetree.pattern * unit
and expression__rec_group = pattern__rec_group
and expression__kinds = [
  1. | `Opaque
]
and expression__gadt = Parsetree.expression * unit
and mismatch__rec_group = pattern__rec_group
and mismatch__kinds = [
  1. | Refl.Builtins.option__kinds
  2. | `String
  3. | `Record
  4. | `Opaque
]
and mismatch__gadt = unit
and failure__rec_group = pattern__rec_group
and failure__kinds = [
  1. | Refl.Builtins.option__kinds
  2. | Refl.Builtins.list__kinds
  3. | `String
  4. | `Record
  5. | `Opaque
]
and failure__gadt = unit
type Refl.refl +=
  1. | Refl_pattern : pattern Refl.refl
type Refl.refl +=
  1. | Refl_expression : expression Refl.refl
type Refl.refl +=
  1. | Refl_mismatch : mismatch Refl.refl
type Refl.refl +=
  1. | Refl_failure : failure Refl.refl
val pattern_refl : (pattern, pattern__structure, unit, pattern__rec_group, [> `Attributes | `Constr | `Opaque | `Record | `String | `Variable ], unit, unit, unit, pattern__gadt) Refl.desc
val expression_refl : (expression, expression__structure, unit, expression__rec_group, [> `Attributes | `Constr | `Opaque | `Record | `String | `Variable ], unit, unit, unit, expression__gadt) Refl.desc
val mismatch_refl : (mismatch, mismatch__structure, unit, mismatch__rec_group, [> `Attributes | `Constr | `Opaque | `Record | `String | `Variable ], unit, unit, unit, mismatch__gadt) Refl.desc
val failure_refl : (failure, failure__structure, unit, failure__rec_group, [> `Attributes | `Constr | `Opaque | `Record | `String | `Variable ], unit, unit, unit, failure__gadt) Refl.desc
type 'a pattern_result = ('a, failure) result
val pattern_result__variable_positive0 : 'a -> 'b -> 'a
val pattern_result__variable_negative0 : 'a -> 'b -> 'b
val pattern_result__variable_direct0 : 'a -> 'b -> 'a
type ('present, 'unknown) pattern_result__variable_positive0 = ('present, 'unknown) Refl.Builtins.result__variable_positive0
and ('present, 'unknown) pattern_result__variable_negative0 = ('present, 'unknown) Refl.Builtins.result__variable_negative0
and ('present, 'unknown) pattern_result__variable_direct0 = ('present, 'unknown) Refl.Builtins.result__variable_direct0
and pattern_result__arity = [
  1. | `Succ of [ `Zero ]
]
and pattern_result__structure = [
  1. | `Name of [ `Apply of [ `SubGADT of [ `RecGroup of Refl.Builtins.result__structure * Refl.Builtins.result__rec_group ] ] * ([ `Variable of [ `Zero ] ] * ([ `Apply of [ `SubGADT of [ `RecGroup of failure__structure * failure__rec_group ] ] * unit * unit * unit * unit * unit ] * unit)) * (([ `Present ], [ `Absent ]) Refl.Builtins.result__variable_positive0 * (([ `Present ], [ `Absent ]) Refl.Builtins.result__variable_positive1 * unit)) * (([ `Present ], [ `Absent ]) Refl.Builtins.result__variable_negative0 * (([ `Present ], [ `Absent ]) Refl.Builtins.result__variable_negative1 * unit)) * (([ `Present ], [ `Absent ]) Refl.Builtins.result__variable_direct0 * (([ `Present ], [ `Absent ]) Refl.Builtins.result__variable_direct1 * unit)) * ((([ `Present ] * unit) * ([ `Absent ] * unit) * ([ `Present ] * unit)) * ((([ `Absent ] * unit) * ([ `Absent ] * unit) * ([ `Absent ] * unit)) * unit)) ]
]
and pattern_result__rec_group = (pattern_result__arity * pattern_result__structure) ref
and pattern_result__kinds = [
  1. | Refl.Builtins.result__kinds
  2. | failure__kinds
  3. | `Variable
]
and 'a0 pattern_result__gadt = unit
type Refl.refl +=
  1. | Refl_pattern_result : 'a0 pattern_result Refl.refl
val pattern_result_refl : 'a0. ('a0 pattern_result, pattern_result__structure, 'a0 * unit, pattern_result__rec_group, [> `Attributes | `Constr | `Opaque | `Record | `String | `Variable ], ([ `Present ], [ `Absent ]) Refl.Builtins.result__variable_positive0 * unit, ([ `Present ], [ `Absent ]) Refl.Builtins.result__variable_negative0 * unit, ([ `Present ], [ `Absent ]) Refl.Builtins.result__variable_direct0 * unit, 'a0 pattern_result__gadt) Refl.desc
type ('a, 'b) matcher = ?quoted:Parsetree.expression -> 'a -> 'b pattern_result
val check : ('a -> Parsetree.expression) -> 'a -> ('a, 'b) matcher -> 'b pattern_result
val format_failure : Format.formatter -> failure -> unit
val elim_type_constraints : Parsetree.expression -> Parsetree.expression
val pp_failure : Format.formatter -> failure -> unit
val pp_pattern_result : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a pattern_result -> unit
OCaml

Innovation. Community. Security.