Module Rule.Attr_multiple_replaceSource
An advanced module if you want to replace an item with multiple attributes simultaneously.
Source
val attr_multiple_replace :
string ->
'a Ppxlib.Extension.Context.t ->
('a, 'list) Ppxlib.Context_free.Rule.Attr_multiple_replace.Attribute_list.t ->
(ctxt:Ppxlib.Expansion_context.Base.t ->
'a ->
'list Ppxlib.Context_free.Rule.Attr_multiple_replace.Parsed_payload_list.t ->
'a) ->
Ppxlib.Context_free.Rule.tRewrite an item when any of the provided list of attributes are present. It has the same caveats as attr_replace.
This function uses GADT lists to provide type safety for the payloads provided: when you call it with [ attr1; attr2 ] the replacement function will provide you with a Parsed_payload_list.t containing [ attr1_payload option; attr2_payload option ]. These are options because not all the attributes are necessarily present on the item.