Skip to content

Commit

Permalink
use basic-cli 0.19.0 link
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton-4 committed Jan 29, 2025
1 parent 77a678b commit 5a8f4d7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion www/content/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- [builtins](/builtins) - docs for modules built into the language—`Str`, `Num`, etc.
- [basic-webserver](https://roc-lang.github.io/basic-webserver/) - a platform for making Web servers ([source code](https://github.com/roc-lang/basic-webserver))
- [basic-cli](https://roc-lang.github.io/basic-cli/0.18.0) - a platform for making command-line interfaces ([source code](https://github.com/roc-lang/basic-cli))
- [basic-cli](https://roc-lang.github.io/basic-cli/0.19.0) - a platform for making command-line interfaces ([source code](https://github.com/roc-lang/basic-cli))
- [plans](/plans) - current plans for future changes to the language

In the future, a language reference will be on this page too.
Expand Down
8 changes: 4 additions & 4 deletions www/content/platforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ Something that sets Roc apart from other programming languages is its <span clas
Here is a Roc application that prints `"Hello, World!"` to the command line:

```roc
app [main] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.17.0/lZFLstMUCUvd5bjnnpYromZJXkQUrdhbva4xdBInicE.tar.br" }
app [main!] { cli: platform "https://github.com/roc-lang/basic-cli/releases/download/0.19.0/Hj-J_zxz7V9YurCSTFcFdu6cQJie4guzsPMUi5kBYUk.tar.br" }
import pf.Stdout
import cli.Stdout
main =
Stdout.line "Hello, World!"
main! = |_args|
Stdout.line!("Hello, World!")
```

Every Roc application, including this one, is built on a _platform_. This application happens to be built on a platform called [basic-cli](https://github.com/roc-lang/basic-cli), which is a platform for building command-line interfaces.
Expand Down
16 changes: 8 additions & 8 deletions www/content/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Let's move out of the REPL and create our first Roc application!
Make a file named `main.roc` and put this in it:

```roc
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.18.0/0APbwVN1_p1mJ96tXjaoiUCr8NBGamr8G8Ac_DrXR-o.tar.br" }
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.19.0/Hj-J_zxz7V9YurCSTFcFdu6cQJie4guzsPMUi5kBYUk.tar.br" }
import pf.Stdout
Expand Down Expand Up @@ -1529,7 +1529,7 @@ Besides being built into the compiler, the builtin modules are different from ot
Let's take a closer look at the part of `main.roc` above the `main` def:

```roc
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.18.0/0APbwVN1_p1mJ96tXjaoiUCr8NBGamr8G8Ac_DrXR-o.tar.br" }
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.19.0/Hj-J_zxz7V9YurCSTFcFdu6cQJie4guzsPMUi5kBYUk.tar.br" }
import pf.Stdout
```
Expand Down Expand Up @@ -1663,7 +1663,7 @@ We'll use these four operations to learn about effects.
Let's revisit that first application.

```roc
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.18.0/0APbwVN1_p1mJ96tXjaoiUCr8NBGamr8G8Ac_DrXR-o.tar.br" }
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.19.0/Hj-J_zxz7V9YurCSTFcFdu6cQJie4guzsPMUi5kBYUk.tar.br" }
import pf.Stdout
Expand Down Expand Up @@ -1692,7 +1692,7 @@ Note that to call this `Stdin.line!`, you need to provide the unit value `{}` as
Let's change `main!` to read a line from `stdin`, and then print what we got:

```roc
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.18.0/0APbwVN1_p1mJ96tXjaoiUCr8NBGamr8G8Ac_DrXR-o.tar.br" }
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.19.0/Hj-J_zxz7V9YurCSTFcFdu6cQJie4guzsPMUi5kBYUk.tar.br" }
import pf.Stdout
import pf.Stdin
Expand Down Expand Up @@ -1786,7 +1786,7 @@ In other words, adding this annotation effectively opted us out of `basic-cli`'s
Here's one way we can handle those errors:

```roc
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.18.0/0APbwVN1_p1mJ96tXjaoiUCr8NBGamr8G8Ac_DrXR-o.tar.br" }
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.19.0/Hj-J_zxz7V9YurCSTFcFdu6cQJie4guzsPMUi5kBYUk.tar.br" }
import pf.Stdout
import pf.Stdin
Expand Down Expand Up @@ -1838,7 +1838,7 @@ Furthermore, if a variable can't possibly contain any useful information, then w
Let's revisit an earlier example:

```roc
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.18.0/0APbwVN1_p1mJ96tXjaoiUCr8NBGamr8G8Ac_DrXR-o.tar.br" }
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.19.0/Hj-J_zxz7V9YurCSTFcFdu6cQJie4guzsPMUi5kBYUk.tar.br" }
import pf.Stdout
import pf.Stdin
Expand Down Expand Up @@ -1884,7 +1884,7 @@ If an error happended here, we wouldn't know which effectful function was the ca
One option is to "tag the error" using `Result.map_err` to wrap the error in a [tag](#tags) like so:

```roc
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.18.0/0APbwVN1_p1mJ96tXjaoiUCr8NBGamr8G8Ac_DrXR-o.tar.br" }
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.19.0/Hj-J_zxz7V9YurCSTFcFdu6cQJie4guzsPMUi5kBYUk.tar.br" }
import pf.Stdout
import pf.Stdin
Expand Down Expand Up @@ -1924,7 +1924,7 @@ The above example could be rewritten to the following with no change to how it
would behave:

```roc
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.18.0/0APbwVN1_p1mJ96tXjaoiUCr8NBGamr8G8Ac_DrXR-o.tar.br" }
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.19.0/Hj-J_zxz7V9YurCSTFcFdu6cQJie4guzsPMUi5kBYUk.tar.br" }
import pf.Stdout
import pf.Stdin
Expand Down

0 comments on commit 5a8f4d7

Please sign in to comment.