mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00

Implements the new app header syntax as discussed in Zulip [1].
app [main] {
cli: platform "../platform/main.roc",
json: "../json/main.roc"
}
Old headers still parse and are automatically upgraded to the new
syntax by the formatter.
[1] 418444862
10 lines
235 B
Text
10 lines
235 B
Text
app [main] { pf: platform "platform/main.roc" }
|
|
|
|
main : U64 -> Str
|
|
main = \num ->
|
|
if num == 0 then
|
|
"I need a positive number here!"
|
|
else
|
|
str = Num.toStr num
|
|
|
|
"The number was $(str), OH YEAH!!! 🤘🤘"
|