Skip to content

Glossary

TermDefinition
.dtyTyphon stub source file. Strictly typed in the Typhon dialect; compiles to PEP 561 .pyi.
.py.mapSource map v2 sidecar. Per-statement (out_line → ty_line) table. Used by tyc trace and the LSP.
.tyTyphon source file.
class!Class form for framework bases (torch.nn.Module, Enum, unittest.TestCase, etc.) that synthesises __init__ with super().__init__() first.
comptimeBuild-time evaluation. comptime let X = expr inlines X as a literal in the emitted Python.
comptime sandboxThe interpreter that runs comptime expressions. Tightly scoped — no I/O, no time, no random.
extendCross-module method attachment to a user-defined class; or method extension to built-ins (with static-receiver call-site rewrites).
frozenClass modifier; emits @dataclass(slots=True, frozen=True). Blocks field reassignment.
gather:Concurrent-await block. Lowers to asyncio.TaskGroup by default.
gatherableDecorator that opts a callee into automatic-gather rewriting (when [strictness] auto-gather = true).
goFire-and-forget spawn. Lowers through typhon_runtime.tasks.spawn with a strong-ref registry.
guardSugar for early-return-with-narrowing on T?.
implMethod block attached to a class. Methods take self explicitly; merged into the class at desugar.
interfaceStructural contract. Lowers to class Name(Protocol):.
lazy importDeferred module import via a proxy class. Thread-safe with double-checked locking.
lazy letDeferred binding. Module-level → lazy_let(lambda: ...). Class-level → @cached_property.
letImmutable local binding. Reassignment is tyc::immutable_assign.
mietteThe Rust crate Typhon uses for diagnostic rendering.
modelClass form for Pydantic BaseModel emission. Always extra="forbid" in v1.
mutMutable local binding.
Ok / ErrThe two constructors of Result[T, E].
PEP 695Python’s generic-syntax PEP (def f[T](x: T)). Typhon’s only generic form.
@pureDecorator that asserts a function meets the six purity conditions.
@memoDecorator that inserts @functools.cache (or @lru_cache(maxsize=N)). Requires the function to qualify as pure.
PGOProfile-guided optimisation. With [strictness] pgo-memoise, hot pure functions get @functools.cache from typhon-profile.json.
**pipe (`>`)**
Result[T, E]Sealed sum type for typed errors. Two constructors: Ok(T) and Err(E).
SalsaThe incremental computation framework Typhon uses. Same one as rust-analyzer and ty.
sealed union`type X = A
soft keywordA token that’s a keyword only in certain positions (e.g. let at the start of a statement). Used for let, mut, comptime, lazy, unsafe, gather, go, guard, interface, impl, extend, model, frozen, type.
structural conformanceA type satisfies an interface if it provides the listed members with compatible signatures, without an implements clause.
tycThe Typhon compiler binary.
typeType-alias keyword. `type X = A
typhon_runtimeGenerated helper module in build/. Emitted only when Result / go / lazy let are used.
typhon.tomlProject configuration file.
unsafe:Lexical region that tolerates Any-inferred expressions. Values acquire an Unsafe[T] marker that must be re-asserted at the boundary.
with-chainwith name = expr?, ...: — sequences Result-returning calls with an optional else err: block.
? (suffix on type)Nullable type. T? is `T
? (suffix on expression)Result propagation. Unwraps Ok; short-circuits Err to the enclosing function.

See also