aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/world/console.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/world/console.lux6
1 files changed, 6 insertions, 0 deletions
diff --git a/stdlib/source/library/lux/world/console.lux b/stdlib/source/library/lux/world/console.lux
index 83b83145d..80e8eaebb 100644
--- a/stdlib/source/library/lux/world/console.lux
+++ b/stdlib/source/library/lux/world/console.lux
@@ -17,6 +17,8 @@
["%" format (#+ format)]]]]])
(interface: .public (Console !)
+ {#.doc (example "An interface to console/terminal I/O.")}
+
(: (-> [] (! (Try Char)))
read)
(: (-> [] (! (Try Text)))
@@ -99,10 +101,14 @@
(as_is)))
(def: .public (write_line message console)
+ {#.doc (example "Writes the message on the console and appends a new-line/line-feed at the end.")}
(All [!] (-> Text (Console !) (! (Try Any))))
(\ console write (format message text.new_line)))
(interface: .public (Mock s)
+ {#.doc (example "A mock/simulation of a console."
+ "Useful for testing.")}
+
(: (-> s (Try [s Char]))
on_read)
(: (-> s (Try [s Text]))