update cli example

This commit is contained in:
Folkert 2022-02-03 22:39:33 +01:00
parent db2d437d78
commit 6f9550d792
4 changed files with 4 additions and 8 deletions

View File

@ -4,11 +4,7 @@ platform "examples/cli"
packages {}
imports [ Task.{ Task } ]
provides [ mainForHost ]
effects fx.Effect
{
putLine : Str -> Effect {},
getLine : Effect Str
}
effects fx.Unused {}
mainForHost : Task {} [] as Fx
mainForHost = main

View File

@ -1,6 +1,6 @@
interface Stdin
exposes [ line ]
imports [ fx.Effect, Task ]
imports [ pf.Effect, Task ]
line : Task.Task Str *
line = Effect.after Effect.getLine Task.succeed# TODO FIXME Effect.getLine should suffice

View File

@ -1,6 +1,6 @@
interface Stdout
exposes [ line ]
imports [ fx.Effect, Task.{ Task } ]
imports [ pf.Effect, Task.{ Task } ]
# line : Str -> Task.Task {} *
# line = \line -> Effect.map (Effect.putLine line) (\_ -> Ok {})

View File

@ -1,6 +1,6 @@
interface Task
exposes [ Task, succeed, fail, await, map, onFail, attempt, forever, loop ]
imports [ fx.Effect ]
imports [ pf.Effect ]
Task ok err : Effect.Effect (Result ok err)