0.11.0
Roc syntax to use this platform:
app [Model, init!, respond!] { 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.
-
Taskis no longer needed, you can switch to usingResult,=>is used in the type of a function if it is effectful. Change:Task.oktoOkTask.errtoErrTasktoResultTask.loopto a recursive function- Example with
=>:
rocVersionCheck : Task {} _ rocVersionCheck =
To:
rocVersionCheck! : {} => Result {} _ rocVersionCheck! = \{} ->
-
We recommend the use of the
trykeyword:- replace
Stdout.line! "hello"withtry Stdout.line! "hello" - use it instead of
Task.await
- replace
Feel free to suggest additions to the migration guide!