#[non_exhaustive]pub enum RustyfiVersion {
V0_0,
V0_1,
}Expand description
Target SATySFi language version.
#[non_exhaustive] because more 0.1.z-era (and later) variants are
expected as the upstream module system design settles; treat any match
on this type as needing a wildcard arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
V0_0
SATySFi 0.0.6 (and, as far as this port is concerned, the rest of the
0.0.x series): @require: / @import: headers, the module-less
surface syntax this port’s rustyfi-syntax / rustyfi-loader /
rustyfi-lang implement.
V0_1
SATySFi 0.1.x: the dev-0-1-0 language generation — an ML-style
module system (F-ing Modules-based), row-polymorphic records and
optional-argument encodings, and a reworked surface grammar — shared
near-identically by saphe-split (confirmed by direct diff). This
says nothing about packaging: V0_1 documents may resolve
dependencies via either today’s @require:/@import: headers
(dev-0-1-0’s own model, and this port’s LoadMode::Legacy) or the
use/manifest/lockfile model (saphe-split’s LoadMode::Envelopes,
a later milestone) — see rustyfi_loader::LoadMode.
Implementations§
Source§impl RustyfiVersion
impl RustyfiVersion
Sourcepub const DEFAULT: RustyfiVersion = Self::V0_0
pub const DEFAULT: RustyfiVersion = Self::V0_0
The version this port targets when none is specified.
Sourcepub fn has_row_polymorphism(&self) -> bool
pub fn has_row_polymorphism(&self) -> bool
Whether this version’s type system has row-polymorphic records and
optional-argument rows (?(l = e) bundles, ?'r row variables).
false for V0_0 (closed Kind::Record rows only); true for
V0_1.
Sourcepub fn has_page_adt(&self) -> bool
pub fn has_page_adt(&self) -> bool
Whether page-break/page-break-multicolumn/page-break-two-column
take the page ADT (A4Paper/UserDefinedPaper) as their paper-size
argument, as opposed to V0_1’s plain length * length. Deliberately
phrased as an assertion about V0_0’s surface (not “is it 0.0.6”),
so a future third generation that also drops the ADT reads correctly
without touching call sites.
Sourcepub fn math_is_split(&self) -> bool
pub fn math_is_split(&self) -> bool
Whether the math type is split into math-text (unparsed ${...}
source) / math-boxes (evaluated tree) with a read-math primitive
bridging them, as opposed to V0_0’s single unsplit math type.
false for V0_0; true for V0_1.
Sourcepub fn graphics_is_collection(&self) -> bool
pub fn graphics_is_collection(&self) -> bool
Whether the graphics type is a collection (0.1’s GraphicD.t = 'a element list, with Clip/Group container elements — a
graphics-producing callback returns ONE graphics value) as opposed
to V0_0’s single drawing element (a callback returns list graphics). false for V0_0; true for V0_1. Backs the
graphics-collection sweep: every fork in the shared
place_graphics/coerce_graphics_result machinery keys on this one
method, so the env and type-env agree by construction (mirrors
math_is_split’s role for the math slice).
Sourcepub fn has_per_binding_stage(&self) -> bool
pub fn has_per_binding_stage(&self) -> bool
Whether a single BINDING may carry its own stage qualifier — 0.1’s
val ~x = e / val persistent ~x = e (dev-0-1-0
parser.mly:416-421, UTBindValue(Stage0 | Persistent0, _)). false
for V0_0, which declares one stage per FILE with a @stage: header
and has no binding-level spelling at all: 0.0.6’s EXACT_TILDE occurs
only as a splice operand prefix (v0.0.6 parser.mly:797) and as macro
syntax (:608, :1199).
The two generations share one cst::TopLet/TopBinding (the 0.1
lowering builds them), so the ~ prefix is parseable under both and
this is what makes it an ERROR under 0.0.6 rather than a silent accept
— see elaborate.rs’s binding_stage.
Sourcepub fn has_code_type_syntax(&self) -> bool
pub fn has_code_type_syntax(&self) -> bool
Whether the code TYPE has a surface spelling — 0.1’s code τ, a
one-argument prefix type application decoded alongside list/ref
(dev-0-1-0 src/frontend/manualTypeDecoder.ml:31-36). false for
V0_0, whose own manual-type decoder (v0.0.6 src/frontend/typeenv.ml:527-530) special-cases list and ref and
nothing else, so CodeType there is inference-only.
Sourcepub fn is_implemented(&self) -> bool
pub fn is_implemented(&self) -> bool
Whether this port actually implements this version end-to-end (lexer through PDF rendering). True for both generations.
Sourcepub fn supported() -> &'static [RustyfiVersion]
pub fn supported() -> &'static [RustyfiVersion]
The subset of RustyfiVersion::all this port can actually load.
Trait Implementations§
Source§impl Clone for RustyfiVersion
impl Clone for RustyfiVersion
Source§fn clone(&self) -> RustyfiVersion
fn clone(&self) -> RustyfiVersion
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RustyfiVersion
Source§impl Debug for RustyfiVersion
impl Debug for RustyfiVersion
Source§impl Default for RustyfiVersion
impl Default for RustyfiVersion
Source§fn default() -> RustyfiVersion
fn default() -> RustyfiVersion
Source§impl Display for RustyfiVersion
impl Display for RustyfiVersion
impl Eq for RustyfiVersion
Source§impl FromStr for RustyfiVersion
impl FromStr for RustyfiVersion
Source§type Err = ParseVersionError
type Err = ParseVersionError
Source§fn from_str(s: &str) -> Result<RustyfiVersion, <RustyfiVersion as FromStr>::Err>
fn from_str(s: &str) -> Result<RustyfiVersion, <RustyfiVersion as FromStr>::Err>
s to return a value of this type. Read moreSource§impl Hash for RustyfiVersion
impl Hash for RustyfiVersion
Source§impl PartialEq for RustyfiVersion
impl PartialEq for RustyfiVersion
impl StructuralPartialEq for RustyfiVersion
Auto Trait Implementations§
impl Freeze for RustyfiVersion
impl RefUnwindSafe for RustyfiVersion
impl Send for RustyfiVersion
impl Sync for RustyfiVersion
impl Unpin for RustyfiVersion
impl UnsafeUnpin for RustyfiVersion
impl UnwindSafe for RustyfiVersion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Copy for Twhere
T: Copy,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.