Skip to content

Replace Word32 with a newtype #382

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 1 commit into from
Dec 21, 2021
Merged

Replace Word32 with a newtype #382

merged 1 commit into from
Dec 21, 2021

Conversation

michaelpj
Copy link
Collaborator

This time with the correct (strange) bounds.

@michaelpj
Copy link
Collaborator Author

Builds are generally passing in haskell/haskell-language-server#2494, so I think this is safe to merge, and then we should be okay to do a release and then fix up HLS.

@Bodigrim
Copy link
Contributor

Bodigrim commented Dec 20, 2021

Introducing OddWord dependency is likely to cause a trouble: it was not updated in years and OddWord-1.0.2.0 already does not build with GHC 9.2.

@michaelpj
Copy link
Collaborator Author

Introducing OddWord dependency is likely to cause a trouble: it was not updated in years and OddWord-1.0.2.0 already does not build with GHC 9.2.

Ugh, how annoying. I was hoping that it was a simple enough package that it would just "keep working".

I was really hoping to avoid writing the plumbing for a 31-bit word myself...

@Bodigrim
Copy link
Contributor

Bodigrim commented Dec 20, 2021

Unexpectedly, older releases of OddWord do work (I guess they contain less type level magic), and since I've revised OddWord-1.0.2.0 with an appropriate base bound, cabal should now be able to derive a working build plan for GHC 9.2. Dunno, still does not sound sustainable to me, but I've been just passing by.

@michaelpj
Copy link
Collaborator Author

Maybe I'll ask if I can take over OddWord. It's a small package.

Copy link
Member

@jneira jneira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, do you think we can continue using OddWord?
Well if it becomes a blocker we can always do the boilerplate

@michaelpj
Copy link
Collaborator Author

Yes, ripping it out later would be a localized change. Maybe the LSP people will hear my plea and change the upper bound (yeah right).

@Bodigrim
Copy link
Contributor

Any particular reason to prefer OddWord to any well-maintained package for modular arithmetic? Something like https://hackage.haskell.org/package/mod-0.1.2.2/docs/Data-Mod-Word.html would do, for instance. OddWord is not even on Stackage.

@michaelpj
Copy link
Collaborator Author

Thanks, it didn't occur to me to look for a modular arithmetic package, that makes a lot of sense in fact!

Mod is missing a bunch of the numeric instances, but that might be okay. Let me see.

This time with the correct (strange) bounds.
@michaelpj michaelpj merged commit 4a8f16f into master Dec 21, 2021
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

Successfully merging this pull request may close these issues.

3 participants