phino-0.0.153: test-resources/evaluate-packs/leaves-unfinished-a-message-no-entry-answers.yaml
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# The walk reduces the message of the copy a branch raises with like any other
# code, and leaves the call of 'L_number_nope', which no entry answers, as it
# is written, the way it leaves any binding it cannot fire. The 'terminate'
# line spells that message out, so the reader sees the error path is
# unfinished (#1867).
symbolic: |
- Ξ»: L_number_gt
dataize:
πΏ1: $.Ο
πΏ2: $.x
π: Ξ¦.bool( Ο β¦ β¦ Ξ» β€ π β§ )
- Ξ»: L_number_plus
dataize:
πΏ1: $.Ο
πΏ2: $.x
π: Ξ¦.number( Ο β¦ β¦ Ξ» β€ π β§ )
- Ξ»: L_fork
dataize:
πΏ1: $.Ο
morph:
π1: $.then
π2: $.else
symbolize:
π3: π1
π4: π2
join:
π5: [π3, π4]
terminators: [L_throw]
π: π5
location: 'Q.@'
deep: true
input: >
β¦ bytes(Ο) β¦ β¦β§,
error(message) β¦ β¦ Ξ» β€ L_throw β§,
bool(Ο) β¦ β¦ if β¦ β¦ Ο β¦ β
, then β¦ β
, else β¦ β
, Ξ» β€ L_fork β§ β§,
number(Ο) β¦ β¦
gt(Ο, x) β¦ β¦ Ξ» β€ L_number_gt β§,
plus(Ο, x) β¦ β¦ Ξ» β€ L_number_plus β§,
nope(Ο, x) β¦ β¦ Ξ» β€ L_number_nope β§ β§,
@ β¦ 5.gt( 0 ).if( then β¦ 1, else β¦ Ξ¦.error( message β¦ 7.nope( 8 ) ) ).plus( 6 ) β§
result: |-
β¦ Ο β¦ π3:Ξ», gt(x) β¦ L_number_gt:Ξ», plus(x) β¦ L_number_plus:Ξ», nope(x) β¦ L_number_nope:Ξ» β§
protocol: |
π(Ξ¦.Ο):
πΒ·0Β·1 := 5
πΒ·0Β·2 := πΒ·0Β·1.gt( x β¦ 0 )
πΌ(L_number_gt):
π»(Ξ¦.aπ΅0):
π(Ξ¦.aπ΅0):
πΒ·1Β·1 := 5
πΒ·1Β·2 := Ξ¦.bytes( Ο β¦ 40-14-00-00-00-00-00-00:Ξ )
πΏΒ·1Β·1 := 40-14-00-00-00-00-00-00 # 5.0
πΏ1Β·1 := πΏΒ·1Β·1 # π»(ΞΎ.Ο)
π»(Ξ¦.aπ΅1):
π(Ξ¦.aπ΅1):
πΒ·1Β·3 := 0
πΒ·1Β·4 := Ξ¦.bytes( Ο β¦ 00-00-00-00-00-00-00-00:Ξ )
πΏΒ·1Β·2 := 00-00-00-00-00-00-00-00 # 0.0
πΏ2Β·1 := πΏΒ·1Β·2 # π»(ΞΎ.x)
πΒ·1Β·5 := Ξ¦.bool( Ο β¦ π1:Ξ» ) # π
π(πΒ·1Β·5):
πΒ·1Β·6 := Ξ¦.bool( Ο β¦ π1:Ξ» )
πΒ·1Β·7 := πΒ·1Β·6 # π(πΒ·1Β·5)
πΒ·0Β·3 := πΒ·1Β·6.if( then β¦ 1 )
πΒ·0Β·4 := πΒ·0Β·3( else β¦ Ξ¦.error( message β¦ 7.nope( 8 ) ) )
πΌ(L_fork):
π»(Ξ¦.aπ΅2):
π(Ξ¦.aπ΅2):
πΒ·2Β·1 := Ξ¦.bool( Ο β¦ π1:Ξ» )
πΏ1Β·2 := π»(π1:Ξ») # π»(ΞΎ.Ο)
π(Ξ¦.aπ΅3):
πΒ·2Β·2 := 1
π(Ξ¦.aπ΅3.Ο):
πΒ·2Β·3 := Ξ¦.bytes( Ο β¦ 3F-F0-00-00-00-00-00-00:Ξ )
π1Β·2 := πΒ·2Β·2 # π(ΞΎ.then)
π(Ξ¦.aπ΅4):
πΒ·2Β·4 := Ξ¦.error( message β¦ 7.nope( 8 ) )
π(Ξ¦.aπ΅4.message):
πΒ·2Β·5 := Ξ¦.bytes( Ο β¦ 40-1C-00-00-00-00-00-00:Ξ )
πΒ·2Β·6 := Ξ¦.number( Ο β¦ πΒ·2Β·5 )
πΒ·2Β·7 := Ξ¦.number( Ο β¦ πΒ·2Β·5 )
πΒ·2Β·8 := Ξ¦.bytes( Ο β¦ 40-20-00-00-00-00-00-00:Ξ )
πΒ·2Β·9 := Ξ¦.number( Ο β¦ πΒ·2Β·8 )
πΒ·2Β·10 := Ξ¦.number( Ο β¦ πΒ·2Β·5 )
πΒ·2Β·11 := πΒ·2Β·10.nope( x β¦ πΒ·2Β·9 )
π2Β·2 := πΒ·2Β·4 # π(ΞΎ.else)
π»(π2:Ξ») == 3F-F0-00-00-00-00-00-00
π3Β·2 := β¦ Ο β¦ Ξ¦.bytes( Ο β¦ π2:Ξ» ), gt(x) β¦ L_number_gt:Ξ», plus(x) β¦ L_number_plus:Ξ», nope(x) β¦ L_number_nope:Ξ» β§ # π1
π4Β·2 := πΒ·2Β·4 # π2
terminate(π»(π1:Ξ»), right, πΒ·2Β·10.nope( πΒ·2Β·9 )) # π4
π5Β·2 := π3Β·2 # [π3, π4]
πΒ·2Β·12 := π5Β·2 # π
πΒ·2Β·13 := π5Β·2 # π(πΒ·2Β·12)
πΒ·0Β·5 := Ξ¦.number( Ο β¦ Ξ¦.bytes( Ο β¦ π2:Ξ» ) ).plus( x β¦ 6 )
π(Ξ¦.Ο.x):
πΒ·0Β·6 := Ξ¦.bytes( Ο β¦ 40-18-00-00-00-00-00-00:Ξ )
πΒ·0Β·7 := Ξ¦.number( Ο β¦ πΒ·0Β·6 )
πΌ(L_number_plus):
π»(Ξ¦.aπ΅5):
π(Ξ¦.aπ΅5):
πΒ·3Β·1 := Ξ¦.number( Ο β¦ Ξ¦.bytes( Ο β¦ π2:Ξ» ) )
πΒ·3Β·2 := Ξ¦.bytes( Ο β¦ π2:Ξ» )
πΏ1Β·3 := π»(π2:Ξ») # π»(ΞΎ.Ο)
π»(Ξ¦.aπ΅6):
π(Ξ¦.aπ΅6):
πΒ·3Β·3 := Ξ¦.number( Ο β¦ πΒ·0Β·6 )
πΒ·3Β·4 := Ξ¦.bytes( Ο β¦ 40-18-00-00-00-00-00-00:Ξ )
πΏΒ·3Β·1 := 40-18-00-00-00-00-00-00 # 6.0
πΏ2Β·3 := πΏΒ·3Β·1 # π»(ΞΎ.x)
πΒ·3Β·5 := Ξ¦.number( Ο β¦ π3:Ξ» ) # π
π(πΒ·3Β·5):
πΒ·3Β·6 := Ξ¦.number( Ο β¦ π3:Ξ» )
πΒ·3Β·7 := πΒ·3Β·6 # π(πΒ·3Β·5)