From edfff2934276bcc0813d7aa472b165c7249e5604 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Tue, 1 Jul 2025 16:39:01 +0200 Subject: [PATCH] glossary flat type (#7918) --- Glossary.md | 8 ++++++++ src/types/types.zig | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Glossary.md b/Glossary.md index b5e8908e2a..0c90ff05e9 100644 --- a/Glossary.md +++ b/Glossary.md @@ -401,6 +401,14 @@ Related definitions in the compiler: - old compiler: search "pub enum Content" in [types/src/subs.rs](crates/compiler/types/src/subs.rs) - new compiler: search "pub const Content" in [check/canonicalize/CIR.zig](src/check/canonicalize/CIR.zig) +## Flat Type + +Represents types without indirection, it's the concrete form that types take after +resolving [variables](#type-variable) and [aliases](#type-alias). + +definitions in the compiler: +- old compiler: search "pub enum FlatType" in [types/src/subs.rs](crates/compiler/types/src/subs.rs) +- new compiler: search "pub const FlatType" in [types/types.zig](src/types/types.zig) ## Canonicalization diff --git a/src/types/types.zig b/src/types/types.zig index 03277f24d9..342228275c 100644 --- a/src/types/types.zig +++ b/src/types/types.zig @@ -208,7 +208,8 @@ pub const TypeIdent = struct { // flat types // -/// A "flat" data type +/// Represents type without indirection, it's the concrete form that a type +/// takes after resolving type variables and aliases. pub const FlatType = union(enum) { str, box: Var,