From 2900cceb0e6a801b67ba4e72240ec54e1386bcb0 Mon Sep 17 00:00:00 2001 From: Carl Meyer Date: Sat, 1 Jun 2024 13:56:25 -0600 Subject: [PATCH] a bit more on gradual unions --- docs/spec/concepts.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/spec/concepts.rst b/docs/spec/concepts.rst index 7c32282b..daceed39 100644 --- a/docs/spec/concepts.rst +++ b/docs/spec/concepts.rst @@ -291,8 +291,11 @@ supertype relation, the union ``T1 | T2`` is a supertype of both ``T1`` and A gradual union type ``S1 | S2``, where ``S1`` and ``S2`` are gradual types, represents all possible sets of values that could be formed by union of the possible sets of values represented by materializations of ``S1`` and ``S2``, -respectively. Thus, via materialization, the gradual types ``S1`` and ``S2`` -are both assignable to a gradual union type ``S1 | S2``. +respectively. + +For any materialization of ``S1`` to ``T1`` and ``S2`` to ``T2``, ``S1 | S2`` +can likewise be materialized to ``T1 | T2``. Thus, the gradual types ``S1`` and +``S2`` are both assignable to the gradual union type ``S1 | S2``. If ``B`` is a subtype of ``A``, ``B | A`` is equivalent to ``A``.