mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 13:37:57 +03:00
15 lines
431 B
Plaintext
15 lines
431 B
Plaintext
(system-include "carp_io.h")
|
|
|
|
(register-type FILE)
|
|
|
|
(defmodule IO
|
|
(register println (Fn [(Ref String)] ()))
|
|
(register print (Fn [(Ref String)] ()))
|
|
(register get-line (Fn [] String))
|
|
(register get-char (Fn [] Char) "getchar")
|
|
(register read-file (Fn [&String] String))
|
|
(register exit (Fn [Int] a))
|
|
(register fopen (Fn [String String] (Ptr FILE)) "fopen")
|
|
(register fwrite (Fn [a Int Int (Ptr FILE)] ()) "fwrite")
|
|
)
|