Roc syntax to use this platform:
app [main] { pf: platform "https://github.com/roc-lang/basic-webserver/releases/download/0.11.0/yWHkcVUt_WydE1VswxKFmKFM5Tlu9uMn6ctPVYaas7I.tar.br" }
Breaking Changes
Full Changelog: 0.10.0...0.11.0
Migration guide
-
!
is now part of the function name of effectful functions (= all platform functions), it is no longer syntax sugar forTask.await
. -
I recommend taking a look at the changes in the hello-web example and copying them for your use case
-
All basic-webserver functions have changed to snake_case naming.
-
Task
is no longer needed, you can switch to usingResult
,=>
is used in the type of a function if it is effectful. Change:Task.ok
toOk
Task.err
toErr
Task
toResult
Task.loop
to a recursive function- Example with
=>
:
rocVersionCheck : Task {} _ rocVersionCheck =
To:
rocVersionCheck! : {} => Result {} _ rocVersionCheck! = \{} ->
-
We recommend the use of the
try
keyword:- replace
Stdout.line! "hello"
withtry Stdout.line! "hello"
- use it instead of
Task.await
- replace
Feel free to suggest additions to the migration guide!