Skip to content

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

Open
@brekk

Description

@brekk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions