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

Big numbers (1e24) + pTrace in JS mode result in an UnknownError(Loc(1, 0, 1)) #165

Open
brekk opened this issue Apr 22, 2024 · 0 comments

Comments

@brekk
Copy link
Contributor

brekk commented Apr 22, 2024

Ostensibly I'm hitting a range limit, but:

import IO from "IO"



e12 = 1000000000000
reale24 = e12 * e12

main = () => {
  IO.pTrace("e12", e12)
  IO.pTrace("reale24", reale24)
}

Prints:

e12 1000000000000
reale24 UnknownError(Loc(1, 0, 1))

I'd expect a warning if I exceed a number limit (if that is indeed the error I'm seeing)

☝️ This is specific to JS mode.

With -t llvm on, it correctly prints:

e12 1000000000000
reale24 2003764205206896640
@brekk brekk changed the title Big numbers (1e24) cause an UnknownError(Loc(1, 0, 1)) Big numbers (1e24) + pTrace in JS mode result in an UnknownError(Loc(1, 0, 1)) Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant