test
[clean-tests.git] / test.icl
index 99d51e1..6459207 100644 (file)
--- a/test.icl
+++ b/test.icl
@@ -1,9 +1,18 @@
 module test
 
-import iTasks
-import iTasks.Extensions.DateTime
+import StdEnv
+from Data.Func import $
+import System.Directory
+import System.Time
 
-Start w = doTasks (onStartup t) w
+:: S s a = S .(s -> *(a, s))
+runS (S s) = s
 
-t :: Task Int
-t = throw "bork"
+(>>=) infixl 1 :: u:(S .a .b) v:(.b -> .(S .a .c)) -> w:(S .a .c), [w <= u,w <= v]
+(>>=) ma a2mb = S \s
+       # (a, s) = runS ma s
+       = runS (a2mb a) s
+
+Start world = flip runS world
+       $   (S time)
+       >>= \_->S (readDirectory "/home/mrl")