diff options
Diffstat (limited to 'source/lux/data/io.lux')
-rw-r--r-- | source/lux/data/io.lux | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/source/lux/data/io.lux b/source/lux/data/io.lux index e5b265959..f03dbddc6 100644 --- a/source/lux/data/io.lux +++ b/source/lux/data/io.lux @@ -7,17 +7,18 @@ ## You must not remove this notice, or any other, from this software. (;import lux - (lux/meta macro) - (lux/control (functor #as F) - (monad #as M)) + (lux (meta macro + ast) + (control (functor #as F) + (monad #as M))) (.. list (text #as T #open ("text:" Text/Monoid)))) -## Types +## [Types] (deftype #export (IO a) (-> (,) a)) -## Syntax +## [Syntax] (defmacro #export (io tokens state) (case tokens (\ (list value)) @@ -27,7 +28,7 @@ _ (#;Left "Wrong syntax for io"))) -## Structures +## [Structures] (defstruct #export IO/Functor (F;Functor IO) (def (F;map f ma) (io (f (ma []))))) @@ -41,7 +42,7 @@ (def (M;join mma) (mma []))) -## Functions +## [Functions] (def #export (print x) (-> Text (IO (,))) (io (_jvm_invokevirtual "java.io.PrintStream" "print" ["java.lang.Object"] |