interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / seed / spirv / traps.unit.om

27 lines · 352 bytes Raw Blame History
1note Nested calls must preserve the callee's first trap, not execute the caller's later trap.
2fn failval x uint to uint
3if eq x 0
4trap 5
5end
6ret x
7end
8fn nestedfail x uint to uint
9y = failval x
10if eq y 0
11trap 9
12end
13ret y
14end
15fn failvoid x uint to void
16if eq x 0
17trap 6
18end
19ret
20end
21fn nestedvoid x uint to uint
22failvoid x
23if eq x 0
24trap 9
25end
26ret x
27end