Module Ppx_template_expander.Attribute_handlerSource
type lookup = | Preserve_atoms(*When evaluating, do not expand identifiers into the set they represent. This form of lookup is used when evaluating set mono and poly attributes for the purposes of mangling, because we mangle by _names_ of sets, not canonical representations of their contents.
*)| Expand_atoms_bound_to_sets(*When evaluating, fully expand all identifiers. This form of lookup is used when evaluating the right hand side of a non-set binding, since here we wish to bind the pattern on the left against all values in the set on the right
*)
type poly_w = [ | `value_binding| `value_description| `module_binding| `module_declaration| `type_declaration| `module_type_declaration| `include_infos
]A ('w, 'b) t is a handler that knows how to consume a particular attribute on 'w syntax items, and produce back 'b values. Note: if the attribute isn't present, the handler will return some default 'b, whether that be None (if 'b is _ option) or some semantic default for the given 'b.
consume t ctx item runs the handler t in the context ctx on item. The handler t strips its corresponding attributes from item in addition to producing its output.
A map from ('a, 'w) Context.t to ('a, 'b) Attribute.t.
A handler for attributes that make definitions/declarations polymorphic. Might return an Error _ if the attribute's payload is malformed. Defaults to Ok { kinds = None; modes = None }.
A handler for attributes that mangle identifiers to the correct monomorphized name. Defaults to { kinds = []; modes = [] }.
val exclave_if_local :
(exclave_if_w,
(Language.Type.mode, Exclave_if.Reason.t list) Exclave_if.t option)
tA handler for attributes that optionally insert exclave_ markers. We expect to replace these attributes with mode-polymorphic tailcalls and/or unboxed types.
Like exclave_if_local, but for allocation identifiers.
A handler for attributes that optionally annotate code as zero-alloc.
Like zero_alloc_if_local, but for allocation identifiers.
val functor_portable :
([ `module_binding | `module_declaration ],
string Astlib.Location.loc option)
tval functor_stateless :
([ `module_binding | `module_declaration ],
string Astlib.Location.loc option)
tval error_you_can_only_use_one_attribute_per_axis :
loc:Astlib.Location.t ->
(_, Syntax_error.t) result