mirror of
https://github.com/HigherOrderCO/Kind.git
synced 2024-09-11 16:36:13 +03:00
13 lines
391 B
Plaintext
13 lines
391 B
Plaintext
IO.run
|
|
: ∀(A: *)
|
|
∀(x: (IO A))
|
|
(IO A)
|
|
= λA λx
|
|
let P = λx(IO A)
|
|
let print = λtext λthen (HVM.print (IO A) text (IO.run A (then Unit.one)))
|
|
let load = λfile λthen (HVM.load (IO A) file λs(IO.run A (then s)))
|
|
let save = λfile λdata λthen (HVM.save (IO A) file data (IO.run A (then Unit.one)))
|
|
let done = λterm (IO.done A term)
|
|
(~x P print load save done)
|
|
|