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

parsing long single-line array literals fails #147

Open
lue-bird opened this issue Oct 21, 2022 · 2 comments
Open

parsing long single-line array literals fails #147

lue-bird opened this issue Oct 21, 2022 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@lue-bird
Copy link
Contributor

Slightly obscure edge case

@robinheghan robinheghan added bug Something isn't working help wanted Extra attention is needed investigation required the issue needs to be verified and removed investigation required the issue needs to be verified labels Dec 15, 2022
@morteako
Copy link

Seems like the issue is underflow coming from the fact that the line length is larger than the range of Word16 (2^16 = 65536), which is used in

data Position
  = Position
      {-# UNPACK #-} !Word16
      {-# UNPACK #-} !Word16
  deriving (Eq, Show)

Should be fixable by using Word32 (or something else larger), but I guess it has to be weighed up against the performance/memory cost.

@robinheghan
Copy link
Member

Pretty certain we'd do fine with Word32.

Thanks for looking into this! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants