mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +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
12 lines
266 B
Text
12 lines
266 B
Text
app [main, Model] { pf: platform "tui-platform/main.roc" }
|
|
|
|
import pf.Program exposing [Program]
|
|
|
|
Model : Str
|
|
|
|
main : Program Model
|
|
main = {
|
|
init: \{} -> "Hello World",
|
|
update: \model, new -> Str.concat model new,
|
|
view: \model -> Str.concat model "!",
|
|
}
|