Skip to content

Commit

Permalink
Merge pull request #20 from lukewilliamboswell/snake_case_builtins
Browse files Browse the repository at this point in the history
Add support for Roc v0.0.0-alpha2
  • Loading branch information
Hasnep authored Feb 11, 2025
2 parents dc3961c + 9ebf716 commit 424b043
Show file tree
Hide file tree
Showing 9 changed files with 439 additions and 414 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install Roc
uses: hasnep/setup-roc@9866c6fdc971ee9f4b3eeba03d825dc32a5efa7f # ratchet:hasnep/[email protected]
with:
roc-version: nightly
roc-version: 0.0.0-alpha2-rolling
- name: Bundle and release the library
uses: hasnep/bundle-roc-library@4364d15b4ae83c99e0bc0caab8a254a5d0a9369f # ratchet:hasnep/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Install Roc
uses: hasnep/setup-roc@9866c6fdc971ee9f4b3eeba03d825dc32a5efa7f # ratchet:hasnep/[email protected]
with:
roc-version: nightly
roc-version: 0.0.0-alpha2-rolling
- name: Generate docs
run: roc docs src/main.roc
- name: Fix absolute paths
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:
- name: Install Roc
uses: hasnep/setup-roc@9866c6fdc971ee9f4b3eeba03d825dc32a5efa7f # ratchet:hasnep/[email protected]
with:
roc-version: nightly
roc-version: 0.0.0-alpha2-rolling
- name: Test the library
run: roc test src/main.roc
37 changes: 23 additions & 14 deletions examples/example.roc
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
app [main] {
cli: platform "https://github.com/roc-lang/basic-cli/releases/download/0.17.0/lZFLstMUCUvd5bjnnpYromZJXkQUrdhbva4xdBInicE.tar.br",
app [main!] {
cli: platform "https://github.com/roc-lang/basic-cli/releases/download/0.19.0/Hj-J_zxz7V9YurCSTFcFdu6cQJie4guzsPMUi5kBYUk.tar.br",
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)
16 changes: 8 additions & 8 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=d7825428df72e3685be7291284c5eeeb1300a7f6";
roc.url = "github:roc-lang/roc/0.0.0-alpha2-rolling";
};

nixConfig = {
Expand Down
Loading

0 comments on commit 424b043

Please sign in to comment.