Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't import unqualified things from builtin modules #2827

Closed
rtfeldman opened this issue Apr 10, 2022 · 1 comment
Closed

Can't import unqualified things from builtin modules #2827

rtfeldman opened this issue Apr 10, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@rtfeldman
Copy link
Contributor

For example, imports [ Num.{ toF32 } ] results in:

── FILE NOT FOUND ──────────────────────────────────────────────────────────────

I am looking for this file, but it's not there:

    /Users/rtfeldman/code/roc/examples/breakout/Num.roc

Is the file supposed to be there? Maybe there is a typo in the file
name?
@rtfeldman rtfeldman added the bug Something isn't working label Apr 10, 2022
@Ivo-Balbaert
Copy link
Contributor

The following code now works fine:

app "test"
    packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.4.0/DI4lqn7LIZs8ZrCDUgLK-tHHpQmxGF1ZrlevRKq5LXk.tar.br" }
    imports [
        pf.Stdout, Num.{ toF32 }
    ]
    provides [main] to pf



main =
    n = Num.toStr (Num.toF32 3.14)
    Stdout.line "n is \(n)"

ivo@megaverse:~/roc_code$ roc --linker=legacy test7.roc
n is 3.140000104904175

(linker=legacy because of #3609)

Presumably this issue is corrected then. Can it be closed @Anton-4?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants