Affine.Loop_chainAn access or effect's enclosing loops form a single nested chain, outermost first. Unlike a routine's sibling loops (Loop_ranges), a single enclosing chain cannot bind the same loop symbol twice: shadowing would make a symbol's range ambiguous between outer and inner binders. Loop_chain.t enforces binder uniqueness at construction with a typed refusal (gh-ocannl-1628).
val sexp_of_t : t -> Sexplib0.Sexp.tinclude Ppx_compare_lib.Equal.S with type t := tval equal : t Base__Ppx_compare_lib.equalval sexp_of_duplicate : duplicate -> Sexplib0.Sexp.texception Duplicate_binder of duplicateval empty : tval is_empty : t -> boolval length : t -> intval enter :
t ->
Indexing.symbol ->
(int * int) ->
(t, duplicate) Stdlib.Result.tenter chain s (lo, hi): appends an innermost binder (s, (lo, hi)) to chain (ordered outermost first), refusing a symbol already bound in chain.
val enter_exn : t -> Indexing.symbol -> (int * int) -> tAs enter, raising Duplicate_binder on a duplicate symbol.
val of_bindings :
(Indexing.symbol * (int * int)) list ->
(t, duplicate) Stdlib.Result.tBuilds a chain from an outermost-first binding list, refusing the first duplicate symbol.
val of_bindings_exn : (Indexing.symbol * (int * int)) list -> tAs of_bindings, raising Duplicate_binder on a duplicate symbol.
val map_symbols :
t ->
f:(Indexing.symbol -> Indexing.symbol) ->
(t, duplicate) Stdlib.Result.tRenames each bound symbol in order, refusing any rename that collides two binders.
val map_symbols_exn : t -> f:(Indexing.symbol -> Indexing.symbol) -> tAs map_symbols, raising Duplicate_binder on a collision.
val find : t -> Indexing.symbol -> (int * int) optionval mem : t -> Indexing.symbol -> boolval to_alist : t -> (Indexing.symbol * (int * int)) listThe enclosing binders, outermost first.
val ranges : t -> Loop_ranges.tThe chain viewed as a Loop_ranges.t box environment.