packages feed

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)