Was playing around with the new compiler after watching the Houston meetup talk :tada:
MacOS x86_64
Built from source on 719fcae1151c0f1ecd30894366cbe4c9e2f99397
I tried to use List.range (docs)and hit two things:
A. From what I can tell the syntax in the docs is out of date At 5 instead of At(5)
But also - it appears to not be implemented? I was surprised that fns from stdlib would be gone
app [main!] { pf: platform "https://github.com/lukewilliamboswell/roc-platform-template-zig/releases/download/0.3/98T93wthPgoBRLYtPTT4RBBsQunrfDG94gihPf1zYYmE.tar.zst" }
import pf.Stdout
main! = |_args| {
_dummy = List.range({ start: At(0), end: Before(10) })
Ok({})
}
Yields the error:
List.range does not exist.
List is in scope, but it has no associated range.
It's referenced here:
┌─ main.roc:6:13
│
6 │ _name = List.range({ start: At(0), end: Before(10) })
│ ^^^^^^^^^^
Found 1 error(s) and 0 warning(s) for main.roc.
Roc crashed: Error evaluating from shared memory: TypeMismatch
Not sure I'm doing something wrong - or if it's issue with new compiler :smile:
List.range isn’t implemented yet in the new compiler. You will find all implemented builtins on the latest main branch in this builtin file: https://github.com/roc-lang/roc/blob/main/src/build/roc/Builtin.roc
@Aaron Strick the docs you linked https://www.roc-lang.org/builtins/alpha4/List/#range are for roc alpha4 (using the old compiler).
Got it! Thanks you for the responses
I had actually found that Builtin.roc file and saw it was missing -- but my mental model was that the compiler provided some core functions to the language, but that much of the standard library was then implemented in roc on top.
So given a rewrite - I had thought the functions in the standard library wouldn't be effected.
So given a rewrite - I had thought the functions in the standard library wouldn't be effected.
Yeah, once we're done implementing all builtins there will be few differences with the old ones
Last time I checked, a lot of the zig-implemented builtins from the previous compiler were ready, sitting and waiting to be wired up to the new Roc interpreter, so you are mostly correct.
Last updated: Dec 21 2025 at 12:15 UTC