Skip to content

Error on unsafe Nix integers and floats #54

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

Merged
merged 3 commits into from
Mar 29, 2025
Merged

Conversation

PgBiel
Copy link
Member

@PgBiel PgBiel commented Mar 29, 2025

Closes #36

Based on gleam-lang/gleam#3764 and gleam-lang/gleam#4118

error: Int is outside Nix's integer range
  ┌─ /src/one/two.gleam:5:5
  
5      9_223_372_036_854_775_808,
       ^^^^^^^^^^^^^^^^^^^^^^^^^

This integer value is too large to be represented by Nix's integer type. To
avoid this error integer values must be in the range -(2^63 - 1) - (2^63 -
1).

error: Float is outside Nix's floating point range
  ┌─ /src/one/two.gleam:1:1
  
1  1.8e308
   ^^^^^^^

This float value is too large to be represented by Nix's floating point
type. To avoid this error float values must be in the range
-1.7976931348623157e308 - 1.7976931348623157e308.

@PgBiel PgBiel added upstream-parity Things missing in Glistix compared to the upstream compiler nix target Related to the nix target's codegen labels Mar 29, 2025
@PgBiel PgBiel added this to the v0.8.0 milestone Mar 29, 2025
@PgBiel PgBiel merged commit fc83632 into main Mar 29, 2025
16 of 17 checks passed
@PgBiel PgBiel deleted the feat/unsafe-num-error branch March 29, 2025 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nix target Related to the nix target's codegen upstream-parity Things missing in Glistix compared to the upstream compiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add safe Nix integer warning or compile error
1 participant