Skip to main content

patch_prolog_shared/
stdlib.rs

1//! The embedded standard library source.
2//!
3//! Pure-Prolog list predicates (ported verbatim from v1) that the
4//! compiler parses BEFORE user files and compiles into every binary;
5//! user clauses for the same name/arity append to the stdlib predicate
6//! (v1 behavior). It lives in `plg-shared` because the stdlib *source*
7//! is part of the language definition — the compiler embeds it and the
8//! LSP offers its predicates in completion, but neither should own it.
9//!
10//! IMPORTANT: only the compiler (compile-time) and the LSP reference
11//! this. The runtime must NOT — `STDLIB_PL` would otherwise be a string
12//! literal in every compiled program (it is dead-stripped today because
13//! nothing in the runtime path touches it).
14pub const STDLIB_PL: &str = include_str!("../stdlib.pl");