unison/unison-src/tests/state1a.u
2021-08-24 11:33:27 -07:00

12 lines
223 B
Plaintext

--State1a ability
structural ability State se2 where
put : ∀ se . se -> {State se} ()
get : ∀ se . {State se} se
id : Int -> Int
id i = i
foo : () -> {State Int} Int
foo unit = id (State.get Int.+ State.get)
> ()