lean4-htt/src
Joachim Breitner 439c3c5544
refactor: make exportEntriesFnEx return all olean levels at once (#13142)
This PR replaces the per-level `OLeanLevel → Array α` return type of
`exportEntriesFnEx` with a new `OLeanEntries (Array α)` structure that
bundles exported, server, and private entries together. This allows
extensions to share expensive computation across all three olean levels
instead of being called three separate times.

A new `computeExtEntries` function in `Environment.lean` calls each
extension's export function once and distributes results across levels.
`mkModuleData` accepts optional pre-computed entries, and `writeModule`
uses `computeExtEntries` to compute once for all three olean parts.

Extensions that previously relied on `env.setExporting` being
pre-applied by `mkModuleData` now call `env.setExporting true`
internally for their exported/server-level filtering, since the export
function is called once rather than per-level.

Extracted from #13117 to be reviewed independently.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 08:57:45 +00:00
..
bin perf: separate meta and non-meta initializers (#12016) 2026-02-26 08:05:19 +00:00
cmake chore: reformat all cmake files (#12218) 2026-01-28 18:23:08 +00:00
include/lean perf: mark inhabited arguments to extern as borrowed (#13094) 2026-03-24 13:54:06 +00:00
Init refactor: simplify grind canonicalizer and fix preprocessing issues (#13149) 2026-03-27 05:00:01 +00:00
initialize
kernel feat: theorems are opaque (#12973) 2026-03-23 13:57:07 +00:00
lake fix: lake: lake cache help put-staged (#13150) 2026-03-27 05:11:43 +00:00
Lean refactor: make exportEntriesFnEx return all olean levels at once (#13142) 2026-03-27 08:57:45 +00:00
library fix: potential Array.get!Internal leaks part 2 (#13148) 2026-03-27 02:51:39 +00:00
runtime perf: mark inhabited arguments to extern as borrowed (#13094) 2026-03-24 13:54:06 +00:00
shell chore: move test suite setup to tests/CMakeLists.txt (#12278) 2026-02-03 13:22:20 +00:00
Std feat: add further cbv annotations (#13135) 2026-03-26 14:55:40 +00:00
util chore: update to c++20 (#12117) 2026-02-11 01:17:40 +00:00
cadical.mk
CMakeLists.txt feat: experimental option to move non-meta compilation out of lean build step (#10291) 2026-03-20 10:39:39 +00:00
config.h.in
githash.h.in
Init.lean feat: add cbv_simproc infrastructure for user-extensible cbv simplification procedures (#12597) 2026-03-10 10:59:13 +00:00
lakefile.toml.in chore: pass the previous stage libLake as plugin (#13000) 2026-03-20 12:23:20 +00:00
lean-toolchain chore: relative lean-toolchains (#12652) 2026-02-25 10:23:35 +00:00
Lean.lean refactor: move getOriginalConstKind? into its own module to avoid future import cycle (#12265) 2026-02-01 16:18:51 +00:00
lean.mk.in
Leanc.lean
LeanChecker.lean refactor: remove Lean.Environment.replay from core (#12972) 2026-03-18 22:11:42 +00:00
LeanIR.lean feat: experimental option to move non-meta compilation out of lean build step (#10291) 2026-03-20 10:39:39 +00:00
out
Std.lean
stdlib.make.in feat: experimental option to move non-meta compilation out of lean build step (#10291) 2026-03-20 10:39:39 +00:00
stdlib_flags.h chore: consistent build flags between USE_LAKE ON and OFF (#12941) 2026-03-17 11:02:55 +00:00
version.h.in