aboutsummaryrefslogtreecommitdiff
path: root/src/iodata.gleam
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2018-12-01 23:47:45 +0000
committerLouis Pilfold <louis@lpil.uk>2018-12-01 23:47:45 +0000
commit466eda4accdaa2e70b4f16a5dc885dcb23d8dac5 (patch)
tree5e94c80d04d7257359706d8fc683576792cc0747 /src/iodata.gleam
parentfd7dc023cbb512d51c5ac7a45271d1625fa945af (diff)
downloadgleam_stdlib-466eda4accdaa2e70b4f16a5dc885dcb23d8dac5.tar.gz
gleam_stdlib-466eda4accdaa2e70b4f16a5dc885dcb23d8dac5.zip
iodata
Diffstat (limited to 'src/iodata.gleam')
-rw-r--r--src/iodata.gleam23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/iodata.gleam b/src/iodata.gleam
new file mode 100644
index 0000000..285a99d
--- /dev/null
+++ b/src/iodata.gleam
@@ -0,0 +1,23 @@
+import any
+
+// TODO: Tests
+
+pub external type Iodata;
+
+pub external fn prepend(Iodata, String) -> Iodata =
+ 'gleam__stdlib' 'iodata_prepend';
+
+pub external fn append(Iodata, String) -> Iodata =
+ 'gleam__stdlib' 'iodata_append';
+
+pub external fn of(String) -> Iodata =
+ 'gleam__stdlib' 'identity';
+
+pub external fn from(List(String)) -> Iodata =
+ 'gleam__stdlib' 'identity';
+
+pub external fn to_string(Iodata) -> String =
+ 'erlang' 'iolist_to_binary';
+
+pub external fn byte_size(Iodata) -> Int =
+ 'erlang' 'iolist_size';