MCPcopy Create free account
hub / github.com/argumentcomputer/ix / decode_name_array

Function decode_name_array

crates/ffi/src/lean_env.rs:635–638  ·  view source on GitHub ↗

Decode an `@& Array Lean.Name` FFI argument into a `Vec `. Uses a fresh `GlobalCache` to deduplicate shared sub-names within the array (the cache keys by pointer identity, so repeat prefixes like `Lean.Meta.Grind.Arith.Cutsat` are decoded once). Callers don't need to manage the cache; it's dropped when this function returns. Preferred over going through `String` + `parse_name` at the FFI bo

(arr: &LeanArray<LeanBorrowed<'_>>)

Source from the content-addressed store, hash-verified

633
634/// Collect list elements as borrowed pointers (no refcount changes).
635/// Uses `LeanList::to_vec` which preserves the `'a` lifetime from the
636/// underlying Lean objects rather than tying it to a local borrow.
637fn collect_list_borrowed<'a>(
638 list: LeanList<LeanBorrowed<'a>>,
639) -> Vec<LeanBorrowed<'a>> {
640 list.to_vec()
641}

Callers 2

rs_kernel_check_constsFunction · 0.85
rs_kernel_check_ixonFunction · 0.85

Calls 1

decode_nameFunction · 0.85

Tested by

no test coverage detected