packages feed

phino-0.0.156: test-resources/evaluate-packs/fires-the-arguments-of-a-copy-it-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 copy is deferred, and 'w' is a call of 'L_inc'. Before it
# writes the 'deferred' line, the 'unfold' line morphs 'w' 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, #1921).
symbolic: |
  - Ξ»: L_fork
    morph:
      𝑛1: $.a
      𝑛2: $.b
    unfold:
      𝑛3: {of: 𝑛2, defer: true}
    join:
      𝑛4: [𝑛1, 𝑛3]
    𝑛: ⟦ Ο† ↦ 𝑛4 ⟧
  - Ξ»: L_inc
    dataize:
      𝛿1: $.x
    𝑛: Ξ¦.num( Ο† ↦ ⟦ Ξ» ‍ 𝜎 ⟧ )
location: 'Q.y'
input: '⟦ box(x, w) ↦ ⟦ Ο† ↦ x.next ⟧, num(Ο†) ↦ ⟦⟧, inc(x) ↦ ⟦ Ξ» ‍ L_inc ⟧, items ↦ ⟦ tail ↦ ⟦ Ξ» ‍ 𝜎1 ⟧ ⟧, y ↦ ⟦ a ↦ ⟦ Ξ» ‍ 𝜎2 ⟧, b ↦ Ξ¦.box( x ↦ Ξ¦.items.tail, w ↦ Ξ¦.inc( ⟦ Ξ” ‍ 2A- ⟧ ) ), Ξ» ‍ L_fork ⟧.Ο† ⟧'
result: '𝜎5:λ'
protocol: |
  𝕄(Ξ¦.y):
    𝔼(L_fork):
      𝑛1Β·1 := 𝜎2:Ξ»  # 𝕄(ΞΎ.a)
      𝕄(Ξ¦.a🌡1):
        𝑛·1Β·1 := Ξ¦.box( x ↦ Ξ¦.items.tail )
        𝑛·1Β·2 := 𝑛·1Β·1( w ↦ Ξ¦.inc( 2A-:Ξ” ) )
      𝑛2Β·1 := 𝑛·1Β·2  # 𝕄(ΞΎ.b)
      𝕄(𝑛2.w):
        𝑛·1Β·3 := Ξ¦.inc( x ↦ 2A-:Ξ” )
      𝔼(L_inc):  # 𝔼(𝑛2.w)
        𝔻(Ξ¦.a🌡2):
          𝛿·2Β·1 := 2A-
        𝛿1Β·2 := 𝛿·2Β·1  # 𝔻(ΞΎ.x)
        𝑛·2Β·1 := Ξ¦.num( Ο† ↦ 𝜎3:Ξ» )  # 𝑛
        𝕄(𝑛·2Β·1):
          𝑛·2Β·2 := Ξ¦.num( Ο† ↦ 𝜎3:Ξ» )
        𝑛·2Β·3 := 𝑛·2Β·2  # 𝕄(𝑛·2Β·1)
      deferred(𝜎4) := Ξ¦.box( x ↦ 𝜎1:Ξ», w ↦ 𝑛·2Β·2 )  # 𝕄(𝑛2.Ο†)
      𝔻(𝜎5:Ξ») ∈ { 𝔻(𝜎2:Ξ»), 𝔻(𝜎4:Ξ») }
      𝑛4Β·1 := 𝜎5:Ξ»  # [𝑛1, 𝑛3]
      𝑛·1Β·4 := 𝜎5:Ξ»:Ο†  # 𝑛
      𝑛·1Β·5 := 𝜎5:Ξ»:Ο†  # 𝕄(𝑛·1Β·4)