phino-0.0.154: test-resources/evaluate-packs/joins-a-branch-whose-phi-reads-its-own-object-when-lenient.yaml
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# A fork whose one branch is an ordinary object: a formation with no Ξ», whose
# value sits in a Ο that reads an attribute of the object itself. π stops at
# that formation, so the branch and a bare symbol differ in shape and depth,
# and the join alone cannot pair them. An entry that says 'lenient: true'
# takes one more step before it gets stuck: it morphs the Ο of that branch,
# fires what it comes to through πΌ, the way 'morph' and 'evaluate' lines do,
# and joins once more, now two bare symbols (#1885).
symbolic: |
- Ξ»: L_eq
π: β¦ Ο β¦ β¦ Ξ» β€ π β§ β§
- Ξ»: L_fork
morph:
π1: $.a
π2: $.b
join:
π3: [π1, π2]
lenient: true
π: π3
location: 'Q.y'
input: 'β¦ y β¦ β¦ a β¦ β¦ Ο β¦ ΞΎ.eq, eq β¦ β¦ Ξ» β€ L_eq β§ β§, b β¦ β¦ Ο β¦ β¦ Ξ» β€ π1 β§ β§, Ξ» β€ L_fork β§.Ο β§'
result: 'π3:Ξ»'
protocol: |
π(Ξ¦.y):
πΌ(L_fork):
π1Β·1 := β¦ Ο β¦ eq, eq β¦ L_eq:Ξ» β§ # π(ΞΎ.a)
π2Β·1 := π1:Ξ»:Ο # π(ΞΎ.b)
π1Β·1 := L_eq:Ξ» # π(π1.Ο)
πΌ(L_eq): # πΌ(π1)
πΒ·2Β·1 := π2:Ξ»:Ο # π
πΒ·2Β·2 := π2:Ξ»:Ο # π(πΒ·2Β·1)
π1Β·1 := πΒ·2Β·2 # πΌ(π1)
π»(π3:Ξ») β { π»(π2:Ξ»), π»(π1:Ξ») }
π3Β·1 := π3:Ξ»:Ο # [π1, π2]
πΒ·1Β·1 := π3Β·1 # π
πΒ·1Β·2 := π3Β·1 # π(πΒ·1Β·1)