Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade for snake_case builtins and PNC #20

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 24 additions & 14 deletions examples/example.roc
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
app [main] {
cli: platform "https://github.com/roc-lang/basic-cli/releases/download/0.17.0/lZFLstMUCUvd5bjnnpYromZJXkQUrdhbva4xdBInicE.tar.br",
app [main!] {
# TODO replace with release URL
cli: platform "../../basic-cli/platform/main.roc",
html: "../src/main.roc",
}

import cli.Stdout
import html.Html
import html.Attribute

main =
page = Html.html [] [
Html.body [] [
Html.h1 [] [Html.text "Roc"],
Html.p [] [
Html.text "My favourite language is ",
Html.a [Attribute.href "https://roc-lang.org/"] [Html.text "Roc"],
Html.text "!",
],
main! = \_args ->
page = Html.html(
[],
[
Html.body(
[],
[
Html.h1([], [Html.text("Roc")]),
Html.p(
[],
[
Html.text("My favourite language is "),
Html.a([Attribute.href("https://roc-lang.org/")], [Html.text("Roc")]),
Html.text("!"),
],
),
],
),
],
]
renderedHtml = Html.render page
Stdout.line renderedHtml
)
rendered_html = Html.render(page)
Stdout.line!(rendered_html)
53 changes: 26 additions & 27 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
roc.url = "github:roc-lang/roc?rev=0295bb58da3de1dec84f63b5a1847ff32a3fd290";
roc.url = "github:roc-lang/roc";
};

nixConfig = {
Expand Down
Loading
Loading