% Input:       nothing; this file holds no code of its own.
% Output:      the six kernel stages, input in pipeline order.
% Owned state: none.
% Invariants:  the stage order is the pipeline order; each stage guards itself.
% Next stage:  tenkz-kernel-language.code.tex, the first stage listed below.
% SPDX-License-Identifier: Apache-2.0
% Copyright the TNLean project; see LICENSE for the full terms.
%
% tenkz-kernel.code.tex is the 1.0 kernel loader.  It held the whole kernel
% until the stage split; it now names the six stages and their order, and
% nothing else.  Consumers that input the kernel by name -- the kernel and
% regression fixtures, and the API examples -- keep working unchanged, which
% is why the name stays.  Each stage carries its own load guard.

% Load guard.  It stands before \ExplSyntaxOn deliberately: a guarded exit
% never reaches the trailing \ExplSyntaxOff, so a guard inside expl3 syntax
% would leave the caller's catcodes changed -- ignoring spaces rather than
% erroring.  Guarding first leaves them exactly as they were found, whether
% the caller had expl3 syntax on or off.
\ifcsname tenkzkernel\endcsname \expandafter\endinput \fi

% Each stage closes its own \ExplSyntaxOn, so the syntax is re-armed before
% every input rather than assumed to survive the one before it.
\ExplSyntaxOn \file_input:n { tenkz-kernel-language.code.tex }
\ExplSyntaxOn \file_input:n { tenkz-kernel-policy.code.tex }
\ExplSyntaxOn \file_input:n { tenkz-kernel-resolve.code.tex }
\ExplSyntaxOn \file_input:n { tenkz-kernel-ink.code.tex }
\ExplSyntaxOn \file_input:n { tenkz-kernel-annotate.code.tex }
\ExplSyntaxOn \file_input:n { tenkz-kernel-surface.code.tex }
\endinput
