Overview
| Comment: | V16o 1. A variant whose type is a product is constructed via its fields. ``` set {segment.lien}s {cible:}$url {contenu:}$segs ;# labeled, order-independent, defaults set {segment.lien}s $url $segs ;# positional set {segment}s(lien.(cible,contenu)) $url $segs ;# your syntax, via the sum set {segment}s($v.($fields)) {*}$values ;# computed ``` The first step of the path selects the variant. All paths must specify the same variant; otherwise, the error "a value of segment has one variant" is raised. A path may also traverse a sum located within a product field: `set {P}r(n.i,m) 4 5`. The messages refer to `segment.lien` rather than `prod<cible:string;…>`. 2. `type def NAME` without a definition returns the definition, using the `type def` syntax: ``` type def segment.lien ;# {string}cible; {list.segment}contenu type def pt ;# {double}x ?= 0; {double}y type def pt.x ;# double ``` The output text can be parsed back in its original form—a property verified by the test suite. Variants of a sum are listed in their internal (sorted) order, and options such as `-strict` are not included in the definition. |
|---|---|
| Timelines: | family | ancestors | descendants | both | tip-764_tcl90 |
| Files: | files | file ages | folders |
| SHA3-256: |
f77a502eb6a1f12fe24756c64f87d3b2 |
| User & Date: | Florentis on 2026-11-04 10:46:42.535 |
| Other Links: | branch diff | manifest | tags |
Context
|
2026-11-05
| ||
| 08:59 | Version 16p adds a field to the `Proc` structure. It allows for the typing of both the return value ... check-in: 1508c3d76a user: Florentis tags: tip-764_tcl90 | |
|
2026-11-04
| ||
| 10:46 | V16o 1. A variant whose type is a product is constructed via its fields. ``` set {segment.lien}s {c... check-in: f77a502eb6 user: Florentis tags: tip-764_tcl90 | |
| 08:32 | What v16n introduces: `type is {disjoint?}S` returns the pairs of variants that can accept the same ... check-in: 43c57f18b6 user: Florentis tags: tip-764_tcl90 | |
Changes
Modified typeparse/REPRISE.md
from [f389267569]
to [072d9bace0].
[diff]
Modified typeparse/VERSION
from [0ca40c5126]
to [b2a0fc2ab1].
[diff]
Modified typeparse/doc/764.md
from [f8483a9df0]
to [19d0487499].
[diff]
Modified typeparse/doc/ANNOTATIONS.fr.md
from [8391386235]
to [1f9c7f788c].
[diff]
Modified typeparse/exemples/texte_enrichi/LISEZMOI.md
from [53a9a44348]
to [f78a147553].
[diff]
Modified typeparse/exemples/texte_enrichi/modele.tcl
from [9106e2a88a]
to [2e1c57a03b].
[diff]
Modified typeparse/exemples/texte_enrichi/test.out
from [274c228037]
to [7c958f4ae9].
[diff]
Modified typeparse/noyau/LISEZMOI.md
from [1573ae6f8d]
to [1bd07d373c].
[diff]
Modified typeparse/tclTypePath.c
from [4ce7963e01]
to [a71f2e01c9].
[diff]
Modified typeparse/tclTypedVar.c
from [8a748f8cac]
to [1b1b00359d].
[diff]
Modified typeparse/tclTypes.c
from [d3986cd0d1]
to [61021ce527].
[diff]
Modified typeparse/tclTypes.h
from [e505ba333a]
to [ed6380dcda].
[diff]
Modified typeparse/tests_tclsh/t92_cast_etiquettes.out
from [86f40c9244]
to [ff94ec721d].
[diff]
Added typeparse/tests_tclsh/t95_variantes_produits.out version [b1151ae63f].
Added typeparse/tests_tclsh/t95_variantes_produits.tcl version [4bf321af7a].