Kind/book/IO.kind2
2024-03-01 20:40:31 -03:00

21 lines
460 B
Plaintext

IO
: ∀(A: *) *
= λA
$(self: (IO A))
∀(P: ∀(x: (IO A)) *)
∀(print:
∀(text: String) ∀(then: ∀(x: Unit) (IO A))
(P (IO.print A text then))
)
∀(load:
∀(file: String) ∀(then: ∀(x: String) (IO A))
(P (IO.load A file then))
)
∀(save:
∀(file: String)
∀(data: String)
∀(then: ∀(x: Unit) (IO A))
(P (IO.save A file data then))
)
∀(done: ∀(term: A) (P (IO.done A term)))
(P self)