Skip to content
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- uses: roc-lang/setup-roc@cbe782d6f165b89c87d99f50a59ac4f5f73b4427 # ratchet:roc-lang/setup-roc@v0.3.0
with:
version: nightly-new-compiler
nightly-tag: nightly-2026-09-26-d6267b4
nightly-tag: nightly-2026-10-03-c507926
- name: Install Rust toolchain
run: |
rustup toolchain install "${{ needs.rust-version.outputs.version }}" --profile minimal --target x86_64-unknown-linux-musl --component llvm-tools-preview
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
- uses: roc-lang/setup-roc@cbe782d6f165b89c87d99f50a59ac4f5f73b4427 # ratchet:roc-lang/setup-roc@v0.3.0
with:
version: nightly-new-compiler
nightly-tag: nightly-2026-09-26-d6267b4
nightly-tag: nightly-2026-10-03-c507926
- name: Install Rust toolchain
shell: bash
run: |
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
- uses: roc-lang/setup-roc@cbe782d6f165b89c87d99f50a59ac4f5f73b4427 # ratchet:roc-lang/setup-roc@v0.3.0
with:
version: nightly-new-compiler
nightly-tag: nightly-2026-09-26-d6267b4
nightly-tag: nightly-2026-10-03-c507926
- name: Install Rust toolchain
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
uses: roc-lang/setup-roc@cbe782d6f165b89c87d99f50a59ac4f5f73b4427 # ratchet:roc-lang/setup-roc@v0.3.0
with:
version: nightly-new-compiler
nightly-tag: nightly-2026-09-26-d6267b4
nightly-tag: nightly-2026-10-03-c507926

- name: Restore released docs
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
uses: roc-lang/setup-roc@cbe782d6f165b89c87d99f50a59ac4f5f73b4427 # ratchet:roc-lang/setup-roc@v0.3.0
with:
version: nightly-new-compiler
nightly-tag: nightly-2026-09-26-d6267b4
nightly-tag: nightly-2026-10-03-c507926

- name: Install Zig
uses: mlugg/setup-zig@8d6198c65fb0feaa111df26e6b467fea8345e46f
Expand Down Expand Up @@ -218,7 +218,7 @@ jobs:
uses: roc-lang/setup-roc@cbe782d6f165b89c87d99f50a59ac4f5f73b4427 # ratchet:roc-lang/setup-roc@v0.3.0
with:
version: nightly-new-compiler
nightly-tag: nightly-2026-09-26-d6267b4
nightly-tag: nightly-2026-10-03-c507926

- name: Install Rust
shell: bash
Expand Down Expand Up @@ -263,7 +263,7 @@ jobs:
uses: roc-lang/setup-roc@cbe782d6f165b89c87d99f50a59ac4f5f73b4427 # ratchet:roc-lang/setup-roc@v0.3.0
with:
version: nightly-new-compiler
nightly-tag: nightly-2026-09-26-d6267b4
nightly-tag: nightly-2026-10-03-c507926

- name: Create docs staging tree
run: mkdir -p docs-site
Expand Down Expand Up @@ -435,7 +435,7 @@ jobs:
uses: roc-lang/setup-roc@cbe782d6f165b89c87d99f50a59ac4f5f73b4427 # ratchet:roc-lang/setup-roc@v0.3.0
with:
version: nightly-new-compiler
nightly-tag: nightly-2026-09-26-d6267b4
nightly-tag: nightly-2026-10-03-c507926

- name: Download release metadata
uses: actions/download-artifact@v8
Expand Down
1 change: 0 additions & 1 deletion examples/check-command.roc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ report! = |name| {

main! : List(OsStr) => Try({}, _)
main! = |_args| {

# A command found on the PATH.
report!("sh")?

Expand Down
1 change: 0 additions & 1 deletion examples/command-line-args.roc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ main! = |args| {

match args {
[first_arg, ..] => {

Stdout.line!("received argument: ${OsStr.display(first_arg)}")?

match OsStr.to_raw(first_arg) {
Expand Down
1 change: 0 additions & 1 deletion examples/error-handling.roc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import pf.Path

main! : List(OsStr) => Try({}, _)
main! = |_args| {

file_name : Path
file_name = "test-file.txt"

Expand Down
1 change: 0 additions & 1 deletion examples/file-accessed-modified-created-time.roc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import pf.Utc

main! : List(OsStr) => Try({}, _)
main! = |args| {

file : Path
file = path_argument(args)?

Expand Down
1 change: 0 additions & 1 deletion examples/file-permissions.roc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import pf.Path

main! : List(OsStr) => Try({}, _)
main! = |args| {

file : Path
file = path_argument(args)?

Expand Down
1 change: 0 additions & 1 deletion examples/file-read-buffered.roc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import pf.Path

main! : List(OsStr) => Try({}, _)
main! = |_args| {

reader : File.Reader
reader = File.open_reader!("LICENSE")?

Expand Down
1 change: 0 additions & 1 deletion examples/file-read-write.roc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import pf.Path

main! : List(OsStr) => Try({}, _)
main! = |_args| {

out_file : Path
out_file = "out.txt"

Expand Down
1 change: 0 additions & 1 deletion examples/file-replace.roc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import pf.Path

main! : List(OsStr) => Try({}, _)
main! = |_args| {

file : Path
file = "greeting.txt"

Expand Down
1 change: 0 additions & 1 deletion examples/file-size.roc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import pf.Path

main! : List(OsStr) => Try({}, _)
main! = |args| {

file : Path
file = path_argument(args)?

Expand Down
1 change: 0 additions & 1 deletion examples/hello.roc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import pf.Stdout

main! : List(OsStr) => Try({}, _)
main! = |args| {

name : Str
name = greeting_name(args)

Expand Down
2 changes: 1 addition & 1 deletion examples/http-client.roc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Send HTTP requests and handle UTF-8, JSON, and transport failures.
app [main!] {
pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.23.0/GNN5tt2gKdX4dhawg4915C4YB193woHFdcCkz31fhGxv.tar.zst",
http: "https://github.com/roc-lang/http/releases/download/1.0.0/6ZUwqYhCS8PU9Mo6MF7oV82ET2o7KYb57CLKDq4cq4sS.tar.zst",
pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.23.0/GNN5tt2gKdX4dhawg4915C4YB193woHFdcCkz31fhGxv.tar.zst",
}

import pf.OsStr
Expand Down
3 changes: 1 addition & 2 deletions examples/http-simple.roc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Fetch UTF-8, JSON, and HTML responses from a local HTTP server.
app [main!] {
pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.23.0/GNN5tt2gKdX4dhawg4915C4YB193woHFdcCkz31fhGxv.tar.zst",
http: "https://github.com/roc-lang/http/releases/download/1.0.0/6ZUwqYhCS8PU9Mo6MF7oV82ET2o7KYb57CLKDq4cq4sS.tar.zst",
pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.23.0/GNN5tt2gKdX4dhawg4915C4YB193woHFdcCkz31fhGxv.tar.zst",
}

import pf.OsStr
Expand All @@ -11,7 +11,6 @@ import http.Request

main! : List(OsStr) => Try({}, _)
main! = |_args| {

hello_str = Http.get_utf8!("http://127.0.0.1:9000/utf8test") ? |err| GetUtf8Failed(err)
Stdout.line!("I received '${hello_str}' from the server.")?

Expand Down
1 change: 0 additions & 1 deletion examples/locale.roc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import pf.Locale

main! : List(OsStr) => Try({}, _)
main! = |_args| {

example_locale : Locale
example_locale = "en-US"

Expand Down
2 changes: 1 addition & 1 deletion examples/path.roc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Inspect a path's filename, extension, string representation, and type (file/dir/symlink).
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.23.0/GNN5tt2gKdX4dhawg4915C4YB193woHFdcCkz31fhGxv.tar.zst" }

import pf.OsStr exposing [OsStr]
import pf.OsStr
import pf.Stdout
import pf.Path

Expand Down
2 changes: 1 addition & 1 deletion examples/sqlite-basic.roc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ print_line! : Str => Try({}, _)
print_line! = |line| Stdout.line!(line)

query_todos_by_status! = |db_path, status|
# `many` when you expect multiple rows to be returned.
# `many` when you expect multiple rows to be returned.
Sqlite.query_many!({
path: db_path,
query: "SELECT id, task, status FROM todos WHERE status = :status;",
Expand Down
1 change: 0 additions & 1 deletion examples/sqlite-everything.roc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ main! = |_args| run!()

run! : () => Try({}, _)
run! = || {

# Read from environment variable, or use default
db_path = match Env.var!("DB_PATH") {
Ok(p) => Path.from_os_str(p)
Expand Down
1 change: 0 additions & 1 deletion examples/tcp-client.roc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import pf.Stdin
# then run this example.
main! : List(OsStr) => Try({}, _)
main! = |_args| {

stream : Tcp.Stream
stream = Tcp.connect!("127.0.0.1", 8085, 1_000) ? |err| ConnectFailed(err)

Expand Down
1 change: 0 additions & 1 deletion examples/temp-dir.roc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import pf.Path

main! : List(OsStr) => Try({}, _)
main! = |_args| {

temp_dir_path : Path
temp_dir_path = Env.temp_dir!()

Expand Down
1 change: 0 additions & 1 deletion examples/time.roc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import pf.Sleep

main! : List(OsStr) => Try({}, _)
main! = |_args| {

start : U128
start = Utc.now!()

Expand Down
14 changes: 7 additions & 7 deletions platform/Cmd.roc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import IOErr exposing [IOErr]
import IOErr
import Host
import OsStr exposing [OsStr]
import OsStr
import Env
import Path exposing [Path]
import Path

## Build and run child processes with native-safe programs, arguments, and
## environment values.
Expand Down Expand Up @@ -453,7 +453,7 @@ flatten_arg_pairs = |pairs, acc, idx| {
flatten_arg_pairs(pairs, acc.append(pair.0).append(pair.1), idx + 1)
Err(_) =>
acc
}
}
}
}

Expand Down Expand Up @@ -508,7 +508,7 @@ path_dirs = |path_value, is_windows|
split_on(u16s, if is_windows ';' else ':')
.keep_if(|segment| !List.is_empty(segment))
.map(Path.windows_u16s)
}
}

## Split a list into segments on a separator element (segments may be empty).
split_on : List(a), a -> List(List(a)) where [a.is_eq : a, a -> Bool]
Expand Down Expand Up @@ -543,7 +543,7 @@ search_dirs! = |dirs, command, extensions, is_windows|
} else {
search_dirs!(rest, command, extensions, is_windows)
}
}
}

search_extensions! : Path, Str, List(Str), Bool => Bool
search_extensions! = |dir, command, extensions, is_windows|
Expand All @@ -555,7 +555,7 @@ search_extensions! = |dir, command, extensions, is_windows|
} else {
search_extensions!(dir, command, rest, is_windows)
}
}
}

## Whether a specific candidate path is runnable: on Windows it must exist, on
## Unix it must carry an executable bit. Either way a directory is rejected,
Expand Down
4 changes: 2 additions & 2 deletions platform/Env.roc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Host
import IOErr exposing [IOErr]
import OsStr exposing [OsStr]
import IOErr
import OsStr
import Path

## Read and modify the process environment without losing native OS strings.
Expand Down
4 changes: 2 additions & 2 deletions platform/File.roc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Host
import Path
import IOErr exposing [IOErr]
import IOErr

## Read file bytes incrementally and seek within files.
##
Expand Down Expand Up @@ -93,7 +93,7 @@ File :: [].{
Ok(bytes) => Ok((Ok(bytes), Reading(current)))
Err(FileErr(err)) => Ok((Err(FileErr(err)), Finished))
}
},
},
),
)
}
Expand Down
2 changes: 1 addition & 1 deletion platform/Host.roc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import IOErr exposing [IOErr]
import IOErr
import InternalHttp
import InternalSqlite

Expand Down
38 changes: 19 additions & 19 deletions platform/InternalSqlite.roc
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
## Define the host-ABI types shared by SQLite effects and the public module.
## These records map directly to the generated Rust glue types.
InternalSqlite :: [].{
SqliteError : {
code : I64,
message : Str,
}
SqliteError : {
code : I64,
message : Str,
}

SqliteValue : [
Null,
Real(F64),
Integer(I64),
String(Str),
Bytes(List(U8)),
]
SqliteValue : [
Null,
Real(F64),
Integer(I64),
String(Str),
Bytes(List(U8)),
]

SqliteState : [
Row,
Done,
]
SqliteState : [
Row,
Done,
]

SqliteBindings : {
name : Str,
value : SqliteValue,
}
SqliteBindings : {
name : Str,
value : SqliteValue,
}
}
6 changes: 3 additions & 3 deletions platform/OsStr.roc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ OsStr := [
Ok(str) => "OsStr.windows(${Json.to_str(str)})"
Err(_) => "OsStr.windows_u16s(${Str.inspect(u16s)})"
}
}
}

## Compare OS strings by their exact tagged representation.
is_eq : OsStr, OsStr -> Bool
Expand Down Expand Up @@ -195,7 +195,7 @@ utf16_to_utf8 = |remaining, out, index|
[unit, ..] if is_surrogate(unit) => Err(InvalidUtf16(index))
[unit, .. as rest] =>
utf16_to_utf8(rest, append_code_point_utf8(out, U16.to_u32(unit)), index + 1)
}
}

utf16_to_utf8_lossy : List(U16) -> List(U8)
utf16_to_utf8_lossy = |u16s| utf16_to_utf8_lossy_help(u16s, [])
Expand All @@ -214,7 +214,7 @@ utf16_to_utf8_lossy_help = |remaining, out|
utf16_to_utf8_lossy_help(rest, append_code_point_utf8(out, 0xFFFD))
[unit, .. as rest] =>
utf16_to_utf8_lossy_help(rest, append_code_point_utf8(out, U16.to_u32(unit)))
}
}

append_code_point_utf8 : List(U8), U32 -> List(U8)
append_code_point_utf8 = |out, code_point|
Expand Down
Loading
Loading