all fixed

This commit is contained in:
Anton-4 2024-04-28 18:27:59 +02:00
parent 6c97407033
commit 9d28e70cdc
No known key found for this signature in database
GPG key ID: 0971D718C0A9B937
6 changed files with 43 additions and 45 deletions

View file

@ -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!",
), ),

View file

@ -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!"

View file

@ -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!

View file

@ -15,7 +15,8 @@ main =
resp = Http.send! request resp = Http.send! request
output = when resp |> Http.handleStringResponse is output =
when resp |> Http.handleStringResponse is
Err err -> crash (Http.errorToString err) Err err -> crash (Http.errorToString err)
Ok body -> body Ok body -> body