Stream: bugs

Topic: Error using exposed effectful function from module in folder


view this post on Zulip George (Aug 21 2026 at 17:56):

Given this example:

# in ./main.roc

app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.22.0/F1JVZPYfWP71s8vk6tHcV1Qx1Ef6CZkwswGoCn8VHZmL.tar.zst" }

import Folder/Foo exposing [log!]

main! = |_args| {
  log!("Hello World!")?
  Ok({})
}

and

# in ./Folder/Foo.roc

import pf.Stdout

Foo := {}.{
    log! = |message| Stdout.line!(message)
}

I get this this error:

│ VALUE NOT EXPOSED ├─ The value log! is not exposed by the module Folder/Foo.
 │  import Folder/Foo exposing [log!]

and

│ NAME NOT IN SCOPE ├─ Nothing is named log! in this scope.
│  log!("Hello World!")?

This seems like a bug, and the error does not occur if I rename the function from log! to log (but I get a warning that an effectful function should end with !).

This happens on the latest roc (I just pulled and rebuilt from source).

view this post on Zulip Richard Feldman (Aug 21 2026 at 19:09):

@George thanks for reporting! Would you mind opening a GitHub issue for that?

view this post on Zulip George (Aug 21 2026 at 19:10):

@Richard Feldman will do!
Just making sure: should I report future bugs I encounter here again, or just open them directly on github?

view this post on Zulip Richard Feldman (Aug 21 2026 at 19:11):

GitHub is better these days...we used to mostly use Zulip for that, but now that more people are using the language, gh is better :smile:

view this post on Zulip George (Aug 21 2026 at 19:15):

created https://github.com/roc-lang/roc/issues/10897


Last updated: Sep 03 2026 at 15:16 UTC