mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
all fixed
This commit is contained in:
parent
6c97407033
commit
9d28e70cdc
6 changed files with 43 additions and 45 deletions
|
@ -17,13 +17,13 @@ Full {
|
||||||
after: [],
|
after: [],
|
||||||
},
|
},
|
||||||
item: [
|
item: [
|
||||||
@27-145 SpaceAfter(
|
@27-146 SpaceAfter(
|
||||||
PackageEntry {
|
PackageEntry {
|
||||||
shorthand: "pf",
|
shorthand: "pf",
|
||||||
spaces_after_shorthand: [
|
spaces_after_shorthand: [
|
||||||
Newline,
|
Newline,
|
||||||
],
|
],
|
||||||
package_name: @31-145 PackageName(
|
package_name: @31-146 PackageName(
|
||||||
"https://github.com/roc-lang/basic-cli/releases/download/0.10.0/vNe6s9hWzoTZtFmNkvEICPErI9ptji_ySjicO6CkucY.tar.br",
|
"https://github.com/roc-lang/basic-cli/releases/download/0.10.0/vNe6s9hWzoTZtFmNkvEICPErI9ptji_ySjicO6CkucY.tar.br",
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
@ -44,7 +44,7 @@ Full {
|
||||||
after: [],
|
after: [],
|
||||||
},
|
},
|
||||||
item: [
|
item: [
|
||||||
@161-170 Package(
|
@162-171 Package(
|
||||||
"pf",
|
"pf",
|
||||||
ModuleName(
|
ModuleName(
|
||||||
"Stdout",
|
"Stdout",
|
||||||
|
@ -63,7 +63,7 @@ Full {
|
||||||
after: [],
|
after: [],
|
||||||
},
|
},
|
||||||
entries: [
|
entries: [
|
||||||
@186-190 ExposedName(
|
@187-191 ExposedName(
|
||||||
"main",
|
"main",
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -73,7 +73,7 @@ Full {
|
||||||
item: ToKeyword,
|
item: ToKeyword,
|
||||||
after: [],
|
after: [],
|
||||||
},
|
},
|
||||||
to: @195-197 ExistingPackage(
|
to: @196-198 ExistingPackage(
|
||||||
"pf",
|
"pf",
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
@ -85,7 +85,7 @@ Full {
|
||||||
Index(2147483648),
|
Index(2147483648),
|
||||||
],
|
],
|
||||||
regions: [
|
regions: [
|
||||||
@199-246,
|
@200-247,
|
||||||
],
|
],
|
||||||
space_before: [
|
space_before: [
|
||||||
Slice(start = 0, length = 2),
|
Slice(start = 0, length = 2),
|
||||||
|
@ -100,17 +100,17 @@ Full {
|
||||||
type_defs: [],
|
type_defs: [],
|
||||||
value_defs: [
|
value_defs: [
|
||||||
Body(
|
Body(
|
||||||
@199-203 Identifier {
|
@200-204 Identifier {
|
||||||
ident: "main",
|
ident: "main",
|
||||||
},
|
},
|
||||||
@210-246 SpaceBefore(
|
@211-247 SpaceBefore(
|
||||||
Apply(
|
Apply(
|
||||||
@210-221 Var {
|
@211-222 Var {
|
||||||
module_name: "Stdout",
|
module_name: "Stdout",
|
||||||
ident: "line",
|
ident: "line",
|
||||||
},
|
},
|
||||||
[
|
[
|
||||||
@222-246 Str(
|
@223-247 Str(
|
||||||
PlainLine(
|
PlainLine(
|
||||||
"I'm a Roc application!",
|
"I'm a Roc application!",
|
||||||
),
|
),
|
||||||
|
|
|
@ -16,11 +16,9 @@ main =
|
||||||
|
|
||||||
task =
|
task =
|
||||||
cwd = Env.cwd!
|
cwd = Env.cwd!
|
||||||
|
|
||||||
Stdout.line! "cwd: $(Path.display cwd)"
|
Stdout.line! "cwd: $(Path.display cwd)"
|
||||||
dirEntries = Dir.list! cwd
|
dirEntries = Dir.list! cwd
|
||||||
contentsStr = Str.joinWith (List.map dirEntries Path.display) "\n "
|
contentsStr = Str.joinWith (List.map dirEntries Path.display) "\n "
|
||||||
|
|
||||||
Stdout.line! "Directory contents:\n $(contentsStr)\n"
|
Stdout.line! "Directory contents:\n $(contentsStr)\n"
|
||||||
Stdout.line! "Writing a string to out.txt"
|
Stdout.line! "Writing a string to out.txt"
|
||||||
File.writeUtf8! path "a string!"
|
File.writeUtf8! path "a string!"
|
||||||
|
|
|
@ -6,7 +6,6 @@ app "form"
|
||||||
main =
|
main =
|
||||||
Stdout.line! "What's your first name?"
|
Stdout.line! "What's your first name?"
|
||||||
firstName = Stdin.line!
|
firstName = Stdin.line!
|
||||||
|
|
||||||
Stdout.line! "What's your last name?"
|
Stdout.line! "What's your last name?"
|
||||||
lastName = Stdin.line!
|
lastName = Stdin.line!
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,9 @@ main =
|
||||||
|
|
||||||
resp = Http.send! request
|
resp = Http.send! request
|
||||||
|
|
||||||
output = when resp |> Http.handleStringResponse is
|
output =
|
||||||
Err err -> crash (Http.errorToString err)
|
when resp |> Http.handleStringResponse is
|
||||||
Ok body -> body
|
Err err -> crash (Http.errorToString err)
|
||||||
|
Ok body -> body
|
||||||
|
|
||||||
Stdout.line output
|
Stdout.line output
|
||||||
|
|
|
@ -10,7 +10,7 @@ app "ingested-file-bytes"
|
||||||
main =
|
main =
|
||||||
# Due to how license is used, it will be a List U8.
|
# Due to how license is used, it will be a List U8.
|
||||||
license
|
license
|
||||||
|> List.map Num.toU64
|
|> List.map Num.toU64
|
||||||
|> List.sum
|
|> List.sum
|
||||||
|> Num.toStr
|
|> Num.toStr
|
||||||
|> Stdout.line!
|
|> Stdout.line!
|
||||||
|
|
|
@ -12,28 +12,28 @@ app "inspect-logging"
|
||||||
|
|
||||||
main =
|
main =
|
||||||
Community.empty
|
Community.empty
|
||||||
|> Community.addPerson {
|
|> Community.addPerson {
|
||||||
firstName: "John",
|
firstName: "John",
|
||||||
lastName: "Smith",
|
lastName: "Smith",
|
||||||
age: 27,
|
age: 27,
|
||||||
hasBeard: Bool.true,
|
hasBeard: Bool.true,
|
||||||
favoriteColor: Blue,
|
favoriteColor: Blue,
|
||||||
}
|
}
|
||||||
|> Community.addPerson {
|
|> Community.addPerson {
|
||||||
firstName: "Debby",
|
firstName: "Debby",
|
||||||
lastName: "Johnson",
|
lastName: "Johnson",
|
||||||
age: 47,
|
age: 47,
|
||||||
hasBeard: Bool.false,
|
hasBeard: Bool.false,
|
||||||
favoriteColor: Green,
|
favoriteColor: Green,
|
||||||
}
|
}
|
||||||
|> Community.addPerson {
|
|> Community.addPerson {
|
||||||
firstName: "Jane",
|
firstName: "Jane",
|
||||||
lastName: "Doe",
|
lastName: "Doe",
|
||||||
age: 33,
|
age: 33,
|
||||||
hasBeard: Bool.false,
|
hasBeard: Bool.false,
|
||||||
favoriteColor: RGB (255, 255, 0),
|
favoriteColor: RGB (255, 255, 0),
|
||||||
}
|
}
|
||||||
|> Community.addFriend 0 2
|
|> Community.addFriend 0 2
|
||||||
|> Community.addFriend 1 2
|
|> Community.addFriend 1 2
|
||||||
|> Inspect.toStr
|
|> Inspect.toStr
|
||||||
|> Stdout.line!
|
|> Stdout.line!
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue