roc-lang / basic-webserver

A basic webserver in Roc
https://roc-lang.github.io/basic-webserver/
Universal Permissive License v1.0
72 stars 15 forks source link

Update code examples to use "!" syntax #55

Closed a-lavis closed 3 months ago

a-lavis commented 3 months ago

According to the tutorial:

If you like, you can always call Task.await directly instead of using ! (since ! is nothing more than syntax sugar for Task.await), but it's a stylistic convention in the Roc ecosystem to use ! instead.

so I thought I'd go ahead and replace usage of Task.await with ! in the examples where it seemed simple to do so. I hope this is helpful!

Anton-4 commented 3 months ago

I believe tests are failing because of https://github.com/roc-lang/roc/issues/6765, we can revisit this PR when that issue is fixed.

lukewilliamboswell commented 3 months ago

The unwrapping in a pipeline was fixed by Kiryl. It's just a parsing bug now for multi line things. We should be able to modify the tests so they don't hit the parsing bug.

Anton-4 commented 3 months ago

Yeah, this was all single line, so I just had to update the Roc version used by nix. Thanks for the tip @lukewilliamboswell :)