phino-0.0.157: test-resources/evaluate-packs/fires-the-arguments-of-a-copy-a-defer-line-defers.yaml
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# The deferral of #1892 over a copy with two arguments: 'x' reads to the bare
# symbol 'π1', so the 'defer' line reading the right side defers the copy,
# and 'w' is a call of 'L_inc'. Before it writes the 'deferred' line, the
# line morphs 'w' in the copy the meta 'π2' is bound to, at 'π2.w', and
# fires what it comes to, so the line names the object 'Ξ¦.num' the argument
# stands for, instead of the call as the code spells it (#1916, #1933,
# and #1982). The left side is the bare symbol 'π3', so the two sides differ
# in their symbols alone, and the join makes one term of them.
symbolic: |
- Ξ»: L_inc
dataize:
πΏ1: $.x
π: Ξ¦.num( Ο β¦ β¦ Ξ» β€ π β§ )
- Ξ»: L_fork
dataize:
πΏ1: $.c
morph:
π1: $.a
π2: $.b
defer:
π3: π1
π4: π2
join:
on: πΏ1
left: π3
right: π4
location: 'Q.y'
input: 'β¦ box(x, w) β¦ β¦ Ο β¦ x.next β§, num(Ο) β¦ β¦β§, inc(x) β¦ β¦ Ξ» β€ L_inc β§, items β¦ β¦ tail β¦ β¦ Ξ» β€ π1 β§ β§, y β¦ β¦ x β¦ β¦ c β¦ β¦ Ξ» β€ π2 β§, a β¦ β¦ Ξ» β€ π3 β§, b β¦ Ξ¦.box( x β¦ Ξ¦.items.tail, w β¦ Ξ¦.inc( β¦ Ξ β€ 2A- β§ ) ), Ξ» β€ L_fork β§, Ξ» β€ L_inc β§.Ο β§'
result: 'π7:Ξ»'
protocol: |
π(Ξ¦.y):
πΌ(L_inc):
π»(Ξ¦.aπ΅0):
πΌ(L_fork):
πΏ1Β·2 := π»(π2:Ξ») # π»(ΞΎ.c)
π1Β·2 := π3:Ξ» # π(ΞΎ.a)
π(Ξ¦.aπ΅3):
πΒ·2Β·1 := Ξ¦.box( x β¦ Ξ¦.items.tail )
πΒ·2Β·2 := πΒ·2Β·1( w β¦ Ξ¦.inc( 2A-:Ξ ) )
π2Β·2 := πΒ·2Β·2 # π(ΞΎ.b)
π3Β·2 := π1Β·2 # π1
π(π2.w):
πΒ·2Β·3 := Ξ¦.inc( x β¦ 2A-:Ξ )
πΌ(L_inc): # πΌ(π2.w)
π»(Ξ¦.aπ΅4):
πΏΒ·3Β·1 := 2A-
πΏ1Β·3 := πΏΒ·3Β·1 # π»(ΞΎ.x)
πΒ·3Β·1 := Ξ¦.num( Ο β¦ π4:Ξ» ) # π
π(πΒ·3Β·1):
πΒ·3Β·2 := Ξ¦.num( Ο β¦ π4:Ξ» )
πΒ·3Β·3 := πΒ·3Β·2 # π(πΒ·3Β·1)
deferred π5 := Ξ¦.box( x β¦ π1:Ξ», w β¦ πΒ·3Β·2 ) # π(π2.Ο)
joined π6 := πΏ1Β·2 ? π3 : π5
πΒ·2Β·4 := π6:Ξ» # π3, π4
πΏ1Β·1 := π»(π6:Ξ») # π»(ΞΎ.x)
πΒ·1Β·1 := Ξ¦.num( Ο β¦ π7:Ξ» ) # π
π(πΒ·1Β·1):
πΒ·1Β·2 := Ξ¦.num( Ο β¦ π7:Ξ» )
πΒ·1Β·3 := πΒ·1Β·2 # π(πΒ·1Β·1)