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

Num.sqrt_checked(4) causes repl to exit #7572

Open
JosephTLyons opened this issue Feb 3, 2025 · 3 comments
Open

Num.sqrt_checked(4) causes repl to exit #7572

JosephTLyons opened this issue Feb 3, 2025 · 3 comments
Labels
bug Something isn't working P-medium Medium priority/frequency

Comments

@JosephTLyons
Copy link

Using version: roc_nightly-macos_apple_silicon-2025-02-01-670d2550603

@Anton-4
Copy link
Collaborator

Anton-4 commented Feb 3, 2025

Thanks for reporting @JosephTLyons!

I was able to produce an error outside the repl as well:

❯ roc build hello.roc 
An internal compiler expectation was broken.
This is definitely a compiler bug.
Please file an issue here: <https://github.com/roc-lang/roc/issues/new/choose>
ambient functions don't unify
Location: crates/compiler/unify/src/unify.rs:202:18

~ 
❯ cat hello.roc 
app [main!] { cli: platform "https://github.com/roc-lang/basic-cli/releases/download/0.19.0/Hj-J_zxz7V9YurCSTFcFdu6cQJie4guzsPMUi5kBYUk.tar.br" }

import cli.Stdout

main! = |_args|
     Stdout.line!(Inspect.to_str(Num.pow(4,2)))

@Anton-4 Anton-4 added the bug Something isn't working label Feb 3, 2025
@Anton-4
Copy link
Collaborator

Anton-4 commented Feb 3, 2025

I believe the repl also uses Inspect.to_str so that may be the source of the problem.

@Anton-4
Copy link
Collaborator

Anton-4 commented Feb 4, 2025

I thought this issue only appeared recently but it's even present in commit 0d9db5b from the 9th of July, I did not check older commits.

@Anton-4 Anton-4 added the P-medium Medium priority/frequency label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P-medium Medium priority/frequency
Projects
None yet
Development

No branches or pull requests

2 participants