File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ instance teletypeFFunctor :: Functor TeletypeF where
12
12
13
13
type Teletype = Free TeletypeF
14
14
15
- putStrLn :: String -> Teletype { }
16
- putStrLn s = liftF $ PutStrLn s {}
15
+ putStrLn :: String -> Teletype Unit
16
+ putStrLn s = liftF $ PutStrLn s unit
17
17
18
18
getLine :: Teletype String
19
19
getLine = liftF $ GetLine (\a -> a)
@@ -29,5 +29,8 @@ echo = do
29
29
a <- getLine
30
30
putStrLn a
31
31
putStrLn " Finished"
32
+ return $ a ++ a
32
33
33
- main = run $ echo
34
+ main = do
35
+ a <- run $ echo
36
+ trace a
Original file line number Diff line number Diff line change @@ -129,10 +129,7 @@ foreign import goEffImpl
129
129
\ return function(){\
130
130
\ while (true) {\
131
131
\ var r = resume(value);\
132
- \ if (isRight(r)) {\
133
- \ var x = fromRight(r);\
134
- \ return function() { return x; };\
135
- \ }\
132
+ \ if (isRight(r)) return fromRight(r);\
136
133
\ value = fn(fromLeft(r))();\
137
134
\ }\
138
135
\ };\
You can’t perform that action at this time.
0 commit comments