ValetReturns the one element in a list, and fails if there are none or multiple.
val map_vars_in_pattern :
(string Ppxlib.Asttypes.loc -> Ppxlib.pattern_desc) ->
Ppxlib.pattern ->
Ppxlib.patternMap over variables in a pattern, calling its argument for each Ppat_var.
val add_type_constraints_to_binding :
(string * (Ppxlib.location * Ppxlib.core_type)) list ->
Ppxlib.value_binding ->
Ppxlib.value_bindingAdd type constraints from vals to a binding. If the pattern is a simple variable, uses pvb_constraint. Otherwise, uses Ppat_constraint on all variables in the pattern.
val merge_vals_let :
loc:Ppxlib__.Location.t ->
(string * (Ppxlib.location * Ppxlib.core_type)) list ->
Ppxlib__.Import.Asttypes.rec_flag ->
Ppxlib.value_binding list ->
Ppxlib__.Import.structure_itemMerge a list of val statements into the let-binding that directly follows them.
Go through the whole file, collect val statements and merge them into the let-binding that directly follows them, using merge_vals_let.