Artifact 4886b38c415b9aa63aab34a612003e7db349d414c53d543823528105a6ebe08d:
- File typeparse/tests_tclsh/t43_dedupe.out — part of check-in [289eebd31b] at 2026-11-06 11:24:44 on branch tip-764_tcl90 — Complete revision of "sums" (sum types). A distinction is now made between two clearly separate categories: "unions," where the specific variant can be reliably inferred from the structure of the data string, and "sums," where the structure of the data string is insufficient to definitively determine the variant. A new syntax for unions has been introduced, now utilizing the `|` symbol. E.g.: `type def matrix {{list(3).list(3)}matrice3x3 | {list(2).list(2)}matrix2x2}` Any ambiguous union will be rejected during construction, triggering an error message. "Sums" now function like "tagged unions" in C—that is, they consist of a union paired with a tag. Consequently, one must reference the tag to identify the specific variant. Sums are always written using commas (`,`). E.g.: `type def Temperature {{double}celsius, {double}farenheit}` (user: Florentis, size: 486) [annotate] [blame] [check-ins using]
--- sans -dedupe : trois cibles / without: three targets 030507070807080909 --- avec -dedupe : x et y partagent la cible / x and y share the target 03030507080909 --- relecture identique / reading gives the same value {7 8} {7 8} {9 9} 1 --- une cible qui contient un lien n'est pas dédupliquée / a target holding a link is not deduped {10 {some {11 none}}} {10 {some {11 none}}} 02040a060a080b000b00 02040a060a060b00 1 --- -dedupe 0 explicite / explicit -dedupe 0 030507070807080909