How do i use tasks in function declarations?
i tried to make this example and it won't let me
doSomething : {} -> Task Str *
doSomething = \{} -> Task.succeed "Hi"
i'm using these imports
imports [
pf.Stdout,
pf.Stdin,
pf.Task.{ await },
pf.Task
]
try replacing the last two lines of the imports
with:
pf.Task.{ Task, await }
that basically says "import the pf.Task
module and bring the Task
type and the await
function into my local scope"
Okay now it works, thanks!
Last updated: Jul 06 2025 at 12:14 UTC