( ixon_env: &IxonEnv, names: &[Name], expect_pass: &[bool], ungrounded: &FxHashMap<Name, String>, )
| 948 | Compile, |
| 949 | } |
| 950 | |
| 951 | impl ErrKind { |
| 952 | fn tag(self) -> u8 { |
| 953 | match self { |
| 954 | ErrKind::Kernel => KERNEL_EXCEPTION_TAG, |
| 955 | ErrKind::Compile => COMPILE_ERROR_TAG, |
| 956 | } |
| 957 | } |
| 958 | } |
| 959 | |
| 960 | /// Per-constant result: `Ok(())` on pass, `Err((kind, msg))` on rejection. |
| 961 | type CheckRes = Result<(), (ErrKind, String)>; |
| 962 | |
| 963 | const KERNEL_CHECK_STACK_SIZE: usize = 256 * 1024 * 1024; |
| 964 | |
| 965 | unsafe extern "C" { |
| 966 | /// Lean runtime (`src/util/thread.cpp`): stack size, in bytes, for |
| 967 | /// subsequently spawned `lthread`s — dedicated task threads and new |
| 968 | /// task-pool workers. This is the knob behind `lean --tstack`. |
| 969 | fn lean_internal_set_thread_stack_size(size: usize); |
| 970 | } |
| 971 | |
| 972 | /// `Ix.Tc.setLeanThreadStackSize : USize → BaseIO Unit` |
| 973 | /// |
| 974 | /// ABI adapter: the runtime setter is a bare `void(size_t)`, so Lean can't |
| 975 | /// `@[extern]` it directly. The pure-Lean parallel checker calls this before |
| 976 | /// spawning its `.dedicated` workers so they get `KERNEL_CHECK_STACK_SIZE`- |
| 977 | /// class stacks — deep recursor expansions overflow the default 8 MB |
| 978 | /// `lthread` stack just like they would the Rust workers' (see above). |
| 979 | #[unsafe(no_mangle)] |
no test coverage detected