phino-0.0.156: test-resources/evaluate-packs/keeps-a-bare-symbol-no-path-casts-for-a-lenient-join.yaml
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# An 'upcast' block casts the bare symbol of its pair only when a path reaches
# every symbol of the other term (#1921). The one symbol of the branch 'b' sits
# under the dispatch '.not', which no path walks into, so both lines bind their
# terms as they are and nothing is written for the cast. The 'join' line of the
# lenient entry then pairs the bare symbol with that one symbol, the way a
# lenient join always did (#1817).
symbolic: |
- Ξ»: L_fork
morph:
π1: $.a
π2: $.b
upcast:
π3: π1
π4: π2
join:
π5: [π3, π4]
lenient: []
π: π5
location: 'Q.y'
input: |
β¦
bool(if) β¦ β¦ Ο β¦ ΞΎ.if( Ξ±0 β¦ β¦ Ξ β€ FF- β§, Ξ±1 β¦ β¦ Ξ β€ 00- β§ ) β§,
y β¦ β¦
a β¦ β¦ Ξ» β€ π1 β§,
b β¦ β¦ Ο β¦ Ξ¦.bool( if β¦ β¦ Ξ» β€ L_fork, left β¦ β
, right β¦ β
, Ο β¦ β¦ Ξ» β€ π2 β§.not β§ ) β§,
Ξ» β€ L_fork
β§.Ο
β§
result: 'β¦ if(left, right) β¦ β¦ Ξ» β€ L_fork, Ο β¦ π3:Ξ».not β§, Ο β¦ if( FF-:Ξ, 00-:Ξ ) β§'
protocol: |
π(Ξ¦.y):
πΌ(L_fork):
π1Β·1 := π1:Ξ» # π(ΞΎ.a)
π2Β·1 := Ξ¦.bool( if(left, right) β¦ β¦ Ξ» β€ L_fork, Ο β¦ π2:Ξ».not β§ ):Ο # π(ΞΎ.b)
π3Β·1 := π1Β·1 # π1
π4Β·1 := Ξ¦.bool( if(left, right) β¦ β¦ Ξ» β€ L_fork, Ο β¦ π2:Ξ».not β§ ):Ο # π2
π»(π3:Ξ») β { π»(π1:Ξ»), π»(π2:Ξ») }
π5Β·1 := Ξ¦.bool( if(left, right) β¦ β¦ Ξ» β€ L_fork, Ο β¦ π3:Ξ».not β§ ):Ο # [π3, π4]
πΒ·1Β·1 := Ξ¦.bool( if(left, right) β¦ β¦ Ξ» β€ L_fork, Ο β¦ π3:Ξ».not β§ ):Ο # π
πΒ·1Β·2 := Ξ¦.bool( if(left, right) β¦ β¦ Ξ» β€ L_fork, Ο β¦ π3:Ξ».not β§ ):Ο # π(πΒ·1Β·1)
πΒ·0Β·1 := Ξ¦.bool( if(left, right) β¦ β¦ Ξ» β€ L_fork, Ο β¦ π3:Ξ».not β§ )