Module Make.WithItems

Parameters

module I : sig ... end

Signature

val item_uid_map : AST.item UId.Map.t
val item_of_uid : UId.t -> AST.item
val associated_items_per_roles : Ast.attrs -> AST.item Prelude.list AssocRole.Map.t
val associated_item : AssocRole.t -> Ast.attrs -> AST.item Prelude.option
val associated_expr : ?keep_last_args:Prelude.int -> AssocRole.t -> Ast.attrs -> AST.expr Prelude.option
val associated_items : AssocRole.t -> Ast.attrs -> AST.item Prelude.list
val associated_exprs : ?keep_last_args:Prelude.int -> AssocRole.t -> Ast.attrs -> AST.expr Prelude.list
val expect_expr : ?keep_last_args:Prelude.int -> (AST.generics * AST.param Prelude.list * AST.expr) -> AST.expr
val associated_refinement_in_type : Ast.span -> Prelude.string Prelude.list -> Ast.attrs -> AST.expr Prelude.option

For type, there is a special treatment. The name of fields are global identifiers, and thus are subject to rewriting by Concrete_ident at the moment of printing. In contrast, in the refinement `fn` item generated by the proc-macros, the arguments are local identifiers, and thus are rewrited in a different manner.

Thus, associated_refinement_in_type takes a list of free_variables: those are already formatted strings as printed by the backend. Then, we rewrite identities in the refinement formula to match exactly this print policy, using *final* local identifiers (see `Local_ident.make_final`).

include sig ... end
val find_unique_attr : Ast.attrs -> f:(Types.ha_payload -> 'a Prelude.option) -> 'a0 Prelude.option
val late_skip : Ast.attrs -> Prelude.bool
val lemma : Ast.attrs -> Prelude.bool
val raw_associated_item : Ast.attrs -> (AssocRole.t * UId.t) Prelude.list