Skip to main content

stdlib_predicates

Function stdlib_predicates 

Source
pub fn stdlib_predicates() -> &'static [(String, usize)]
Expand description

The (name, arity) of every predicate defined in the embedded stdlib (plg_shared::STDLIB_PL), parsed once and cached. Lets the REPL (and, eventually, the LSP) offer stdlib predicates — member/append/length/ reverse/nth0/nth1/last — in completion from one source, alongside the builtin table. Returns an empty slice if the stdlib ever fails to parse (it can’t in practice; the stdlib is fixed).