avh4 / avh4/elm-format

Large number gets rewritten into a different number

Open
#690 4 comments 0 reactions 0 assignees View on GitHub
blocked: Elm 0.19.2
Dominant language
Haskell
Stars
1.3k
Forks
147
PR merge metrics
No merged PRs in 30d

Description

While investigating around #688 I found this:
`9223372036854776000` (which is what gets returned from `elm repl` as a value of the max hex integer parsable by Elm - `0x7FFFFFFFFFFFFFFF`)
gets rewritten by elm-format into
`-9223372036854775616`

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue by formatting the maximum hexadecimal integer value reported by elm repl, then compare elm-format's output with the original numeric value. Trace the formatter's handling of large integer literals and add coverage for 0x7FFFFFFFFFFFFFFF; done means it no longer becomes -9223372036854775616.

Written by the indexing model from the issue text.

Assessment

Tech stack
elm, haskell
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.