mirror of
https://github.com/HigherOrderCO/Kind.git
synced 2024-09-11 16:25:54 +03:00
21 lines
460 B
Plaintext
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) |