unison/unison-src/tests/io-state3.u

11 lines
270 B
Plaintext

--IO3 effect
effect IO where
launch-missiles : () -> {IO} ()
-- binding IS guarded, so its body can access whatever abilities
-- are declared by the type of the binding
-- ambient abilities (which will be empty)
ex1 : () -> {IO} ()
ex1 unit = IO.launch-missiles()
()