Overview
| Comment: | What v16n introduces: `type is {disjoint?}S` returns the pairs of variants that can accept the same value; it returns nothing if the sum is disjoint. `type is {strict?}S` is also available. `type def {-strict}S`: the variant is never inferred (guessed). A "bare" value is rejected: "value 5 names no variant of the strict sum S: write `{i:}value` or `{S.i}value`." Accepted forms include: an already-typed value, a label such as `{i:}` or `{S.i}`, or a type cast like `S.i`. A variant literal is identified by its value, and when stored in a typed variable, the current variant is preserved. `type def {-deduce}S` retains the previous behavior: the strictest variant takes precedence. Warning: An overlapping sum defined without any options will trigger a message on `stderr` suggesting either `{-deduce}` or `{-strict}`. A disjoint sum will not trigger such a message. Multiple options: `{-compact, -strict}` can be used within the annotation syntax. The structure is flattened (e.g., `{-a.(b=1, c=2)}` becomes `-a.b=1` and `-a.c=2`), meaning sub-option syntax is supported. Currently, no `type def` options utilize this; for instance, `{-strict.x=1}` will result in a clear error message. |
|---|---|
| Timelines: | family | ancestors | descendants | both | tip-764_tcl90 |
| Files: | files | file ages | folders |
| SHA3-256: |
43c57f18b659ba01ce443923054d31ca |
| User & Date: | Florentis on 2026-11-04 08:32:02.095 |
| Other Links: | branch diff | manifest | tags |
Context
|
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 | |
| 05:30 | remove immediate casting of values, be more strict in choosing variant of sum check-in: 317a8a44ce user: Florentis tags: tip-764_tcl90 | |
Changes
Modified typeparse/REPRISE.md
from [b438e30668]
to [f389267569].
[diff]
Modified typeparse/VERSION
from [a78ff3f59a]
to [0ca40c5126].
[diff]
Modified typeparse/doc/764.md
from [5264a8766a]
to [f8483a9df0].
[diff]
Modified typeparse/doc/ANNOTATIONS.fr.md
from [920b6386bb]
to [8391386235].
[diff]
Added typeparse/exemples/.gif version [fece8189f6].
Added typeparse/exemples/.png version [84addac0ad].
Modified typeparse/exemples/convertir_images.tcl
from [d620e542b0]
to [823334405e].
[diff]
Modified typeparse/exemples/deref_manual.tcl
from [9178555c5f]
to [2aa269b7d9].
[diff]
Modified typeparse/exemples/gif_somme.tcl
from [b8b66d1af1]
to [3cf80fc1e5].
[diff]
Modified typeparse/exemples/niveau2.tcl
from [e37b6ec992]
to [b297860ba8].
[diff]
Modified typeparse/exemples/png_somme.tcl
from [63499c992d]
to [60e652aae7].
[diff]
Modified typeparse/exemples/tcl_obj.tcl
from [6084e211bd]
to [d888df49ce].
[diff]
Modified typeparse/exemples/texte_enrichi/LISEZMOI.md
from [fbbea90ae5]
to [53a9a44348].
[diff]
Added typeparse/exemples/texte_enrichi/modele.tcl version [9106e2a88a].
Added typeparse/exemples/texte_enrichi/test.out version [274c228037].
Modified typeparse/noyau/LISEZMOI.md
from [14e855b067]
to [1573ae6f8d].
[diff]
Modified typeparse/tclTypes.c
from [fd602c708c]
to [d3986cd0d1].
[diff]
Modified typeparse/tclTypes.h
from [69b5d993d8]
to [e505ba333a].
[diff]
Modified typeparse/tests_tclsh/t18_elements_types.tcl
from [c12f7e25b8]
to [051321c3c5].
[diff]
Modified typeparse/tests_tclsh/t22_somme_balisee.tcl
from [bcbb8b95a4]
to [c7312eb9a5].
[diff]
Modified typeparse/tests_tclsh/t29_deref_arbres_sommes.tcl
from [0feaa4cadf]
to [a3c5aefd21].
[diff]
Modified typeparse/tests_tclsh/t35_niveau2.tcl
from [0ca37d5326]
to [cf9cd1f61c].
[diff]
Modified typeparse/tests_tclsh/t36_somme_choisie.tcl
from [e4c647c2b4]
to [3cda45e01e].
[diff]
Modified typeparse/tests_tclsh/t49_cast_constructeur.tcl
from [85dc06f30d]
to [151023cdd6].
[diff]
Modified typeparse/tests_tclsh/t57_selecteur.tcl
from [2fe63bc81a]
to [61e977f03c].
[diff]
Modified typeparse/tests_tclsh/t63_separateurs.tcl
from [b6a6e6d448]
to [53ad79a6d6].
[diff]
Modified typeparse/tests_tclsh/t64_variante_inactive.tcl
from [ea551363eb]
to [86ef4d0aef].
[diff]
Modified typeparse/tests_tclsh/t66_variantes_meme_forme.tcl
from [dd4b7f8912]
to [360ebdc643].
[diff]
Modified typeparse/tests_tclsh/t67_conversion_variantes.tcl
from [cbb8707e06]
to [5cee76d576].
[diff]
Modified typeparse/tests_tclsh/t72_compact_type.out
from [d6dd554948]
to [04b33e6caf].
[diff]
Modified typeparse/tests_tclsh/t76_lecture_champ.tcl
from [3928dbe20d]
to [0040bde652].
[diff]
Modified typeparse/tests_tclsh/t80_lappend_contrat.tcl
from [1fb7e918c9]
to [bbe0853136].
[diff]
Modified typeparse/tests_tclsh/t81_codec_c_chaines.tcl
from [0109f5d99c]
to [a2cbaf7aba].
[diff]
Modified typeparse/tests_tclsh/t82_declaration_compilee.tcl
from [347fe20e66]
to [a049a59813].
[diff]
Modified typeparse/tests_tclsh/t83_lecture_champ_affectation.tcl
from [f85a50a7b7]
to [8b2643779d].
[diff]
Modified typeparse/tests_tclsh/t88_parties_produit.tcl
from [f086c7a75a]
to [1e421dfd6b].
[diff]
Modified typeparse/tests_tclsh/t91_type_forget.tcl
from [e99f17cfd9]
to [b4adf375eb].
[diff]
Modified typeparse/tests_tclsh/t92_cast_etiquettes.tcl
from [c944038107]
to [39ca181ce8].
[diff]
Modified typeparse/tests_tclsh/t93_piste_b.tcl
from [5f8b2ef387]
to [17674dd956].
[diff]
Added typeparse/tests_tclsh/t94_sommes_strictes.out version [a513e3b531].
Added typeparse/tests_tclsh/t94_sommes_strictes.tcl version [945fa0958e].