Stream: beginners

Topic: Should i be able to run code with the new compiler?


view this post on Zulip Eli Dowling (Jan 22 2026 at 16:01):

EDIT: I'm a fool, and I was immediately corrected. But there is a proper bug below

I can't tell if i'm just being stupid but i can't seem to actually compile anything with roc:
if I fetch the latest nightly compiler and compile the most basic program:

app [main!] { cli: platform "https://github.com/lukewilliamboswell/roc-platform-template-zig/releases/download/0.6/2BfGn4M9uWJNhDVeMghGeXNVDFijMfPsmmVeo6M4QjKX.tar.zst" }

import pf.Stdin
import pf.Stdout

# Demonstrates: Stdin.line!, interactive I/O, effectful functions

main! : List(Str) => Try({}, [Exit(I32)])
main! = |_args| {
    Stdout.line!("Enter something and I'll echo it back:")

    input = Stdin.line!()
    Stdout.line!("You entered: ${input}")

    Ok({})
}

I see:

-- UNDEFINED VARIABLE ----------------------------

Nothing is named line! in this scope.
Is there an import or exposing missing up-top?

   ┌─ main.roc:10:5
   │
10 │     Stdout.line!("Enter something and I'll echo it back:")
   │     ^^^^^^^^^^^^

-- UNDEFINED VARIABLE ----------------------------

Nothing is named line! in this scope.
Is there an import or exposing missing up-top?

   ┌─ main.roc:12:13
   │
12 │     input = Stdin.line!()
   │             ^^^^^^^^^^^

-- UNDEFINED VARIABLE ----------------------------

Nothing is named line! in this scope.
Is there an import or exposing missing up-top?

   ┌─ main.roc:13:5
   │
13 │     Stdout.line!("You entered: ${input}")
   │     ^^^^^^^^^^^^


Found 3 error(s) and 0 warning(s) for main.roc.

I'm not sure if I'm just being super stupid or if something is broken somehow??

view this post on Zulip JRI98 (Jan 22 2026 at 16:13):

Hi there. I think it's the imports. pf doesn't exist, it's called cli in your code

view this post on Zulip Eli Dowling (Jan 22 2026 at 16:14):

See this is why i needed help. Far too lost in it to see what's in front of me! thankyou!

view this post on Zulip Eli Dowling (Jan 22 2026 at 17:16):

Okay I've definitely found a bug now.
When I make a module and import it I always get an error saying the module doesn't have the value I'm using
But it runs fine with roc.
Error:

-- DOES NOT EXIST --------------------------------

Basic.val does not exist.

Basic is in scope, but it has no associated val.

It's referenced here:
  ┌─ /home/eli/Code/roc/test/test-clean/main.roc:9:24
  │
9 │     Stdout.line!("hi ${Basic.val}")
  │                        ^^^^^^^^^


Found 1 error(s) and 0 warning(s) in 12.3 ms for main.roc.

Basic.roc

Basic := [].{
  val="hi"
}

main.roc

app [main!] { pf: platform "https://github.com/lukewilliamboswell/roc-platform-template-zig/releases/download/0.6/2BfGn4M9uWJNhDVeMghGeXNVDFijMfPsmmVeo6M4QjKX.tar.zst" }

import pf.Stdout
import Basic

main! = |_args| {
    Stdout.line!("hi ${Basic.val}")

    Ok({})
}

view this post on Zulip Rick Hull (Jan 22 2026 at 17:31):

If you have the gh (github) client, you can use https://github.com/rickhull/roc-init/blob/master/rocgist.sh to create a gist for you, rather than copy pasting large messages straight into Zulip. Not saying it's a problem for the chat, but I find rocgist.sh to be a nicer "get support" workflow

view this post on Zulip Rick Hull (Jan 22 2026 at 17:44):

Also, this might help as an example of a working platform on the new compiler. I am very new to both Roc and Zig so my troubleshooting abilities are not great. https://github.com/rickhull/schnorr-platform

view this post on Zulip Luke Boswell (Jan 22 2026 at 20:29):

Eli Dowling said:

Okay I've definitely found a bug now.
When I make a module and import it I always get an error saying the module doesn't have the value I'm using
But it runs fine with roc.
Error:

-- DOES NOT EXIST --------------------------------

Basic.val does not exist.

Basic is in scope, but it has no associated val.

It's referenced here:
  ┌─ /home/eli/Code/roc/test/test-clean/main.roc:9:24
  │
9 │     Stdout.line!("hi ${Basic.val}")
  │                        ^^^^^^^^^


Found 1 error(s) and 0 warning(s) in 12.3 ms for main.roc.

Basic.roc

Basic := [].{
  val="hi"
}

main.roc

app [main!] { pf: platform "https://github.com/lukewilliamboswell/roc-platform-template-zig/releases/download/0.6/2BfGn4M9uWJNhDVeMghGeXNVDFijMfPsmmVeo6M4QjKX.tar.zst" }

import pf.Stdout
import Basic

main! = |_args| {
    Stdout.line!("hi ${Basic.val}")

    Ok({})
}

I think this is the same bug @nandi was talking about earlier in the week. If someone could make a GH issue... I should have time today to look at that.

I've been travelling all week and hadn't been able to work on anything.


Last updated: Feb 20 2026 at 12:27 UTC