Skip to content

0.11.0

Latest
Compare
Choose a tag to compare
@Anton-4 Anton-4 released this 28 Dec 16:41
· 9 commits to main since this release
0408266

examples

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

  • Rename all functions to snake_case #84
  • Upgrade to purity inference #84

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 for Task.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 using Result, => is used in the type of a function if it is effectful. Change:

    • Task.ok to Ok
    • Task.err to Err
    • Task to Result
    • 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" with try Stdout.line! "hello"
    • use it instead of Task.await

Feel free to suggest additions to the migration guide!