Skip to content

Commit 71a0666

Browse files
authored
Merge pull request #300 from roc-lang/examples-tip-comment
Added tip to examples
2 parents f2825da + 75c5dc3 commit 71a0666

23 files changed

+45
-0
lines changed

examples/args.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ app [main!] {
22
pf: platform "../platform/main.roc",
33
}
44

5+
# To run this example: check the README.md in this folder
6+
57
import pf.Stdout
68
import pf.Arg exposing [Arg]
79

examples/command.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
app [main!] { pf: platform "../platform/main.roc" }
22

3+
# To run this example: check the README.md in this folder
4+
35
import pf.Stdout
46
import pf.Cmd
57

examples/countdown.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
app [main!] { pf: platform "../platform/main.roc" }
22

3+
# To run this example: check the README.md in this folder
4+
35
import pf.Stdin
46
import pf.Stdout
57

examples/dir.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
app [main!] { pf: platform "../platform/main.roc" }
22

3+
# To run this example: check the README.md in this folder
4+
35
import pf.Stdout
46
import pf.Dir
57
import pf.Path

examples/echo.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
app [main!] { pf: platform "../platform/main.roc" }
22

3+
# To run this example: check the README.md in this folder
4+
35
import pf.Stdin
46
import pf.Stdout
57

examples/env-var.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
app [main!] { pf: platform "../platform/main.roc" }
22

3+
# To run this example: check the README.md in this folder
4+
35
import pf.Stdout
46
import pf.Env
57

examples/file-mixed.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
app [main!] { pf: platform "../platform/main.roc" }
22

3+
# To run this example: check the README.md in this folder
4+
35
import pf.Stdout
46
import pf.Stderr
57
import pf.File

examples/file-read-buffered.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
app [main!] { pf: platform "../platform/main.roc" }
22

3+
# To run this example: check the README.md in this folder
4+
35
import pf.Stdout
46
import pf.File
57

examples/file-read.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
app [main!] { pf: platform "../platform/main.roc" }
22

3+
# To run this example: check the README.md in this folder
4+
35
import pf.Stdout
46
import pf.File
57

examples/form.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
app [main!] { pf: platform "../platform/main.roc" }
22

3+
# To run this example: check the README.md in this folder
4+
35
import pf.Stdin
46
import pf.Stdout
57

examples/hello-world.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
app [main!] { pf: platform "../platform/main.roc" }
22

3+
# To run this example: check the README.md in this folder
4+
35
import pf.Stdout
46

57
main! = \_args ->

examples/http-get-json.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ app [main!] {
33
json: "https://github.com/lukewilliamboswell/roc-json/releases/download/0.11.0/z45Wzc-J39TLNweQUoLw3IGZtkQiEN3lTBv3BXErRjQ.tar.br",
44
}
55

6+
# To run this example: check the README.md in this folder
7+
68
import pf.Http
79
import pf.Stdout
810
import json.Json

examples/http-get.roc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import pf.Http
44
import pf.Stdout
55

66
# Basic HTTP GET request
7+
# To run this example: check the README.md in this folder
78

89
main! = \_args ->
910

examples/path.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ app [main!] { pf: platform "../platform/main.roc" }
33
import pf.Stdout
44
import pf.Path
55

6+
# To run this example: check the README.md in this folder
7+
68
main! = \_args ->
79

810
path = Path.from_str "path.roc"

examples/piping.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ app [main!] { pf: platform "../platform/main.roc" }
33
import pf.Stdout
44
import pf.Stdin
55

6+
# To run this example: check the README.md in this folder
7+
68
# Try piping in some text like this: `echo -e "test\n123" | roc piping.roc`
79
main! = \_args ->
810
lines = count! 0

examples/record-builder.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ app [main!] {
44

55
import pf.Stdout
66

7+
# To run this example: check the README.md in this folder
8+
79
main! = \_args ->
810
{ apples, oranges } = try
911
{ Result.map2 <-

examples/result.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ app [main!] { pf: platform "../platform/main.roc" }
22

33
import pf.Stdout
44

5+
# To run this example: check the README.md in this folder
6+
57
main! = \_args ->
68
when check_file! "good" is
79
Ok Good -> Stdout.line! "GOOD"

examples/sqlite.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import pf.Env
44
import pf.Stdout
55
import pf.Sqlite
66

7+
# To run this example: check the README.md in this folder
8+
79
main! = \_args ->
810
db_path = try Env.var! "DB_PATH"
911

examples/stdin.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import pf.Stdout
44
import pf.Stderr
55
import pf.Stdin
66

7+
# To run this example: check the README.md in this folder
8+
79
main! = \_args ->
810
try Stdout.line! "Enter a series of number characters (0-9):"
911

examples/task-list.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ app [main!] { pf: platform "../platform/main.roc" }
22

33
import pf.Stdout
44

5+
# To run this example: check the README.md in this folder
6+
57
main! = \_args ->
68
# Prints out each of the authors
79
print! ["Foo", "Bar", "Baz"]

examples/tcp-client.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import pf.Stdout
55
import pf.Stdin
66
import pf.Stderr
77

8+
# To run this example: check the README.md in this folder
9+
810
main! = \_args ->
911
when run! {} is
1012
Ok {} -> Ok {}

examples/temp-dir.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import pf.Stdout
44
import pf.Env
55
import pf.Path
66

7+
# To run this example: check the README.md in this folder
8+
79
## Prints the default temp dir
810
##
911
## !! requires --linker=legacy

examples/time.roc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import pf.Stdout
44
import pf.Utc
55
import pf.Sleep
66

7+
# To run this example: check the README.md in this folder
8+
79
main! = \_args ->
810
start = Utc.now! {}
911

0 commit comments

Comments
 (0)