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

Allow random-1.3 #55

Merged
merged 2 commits into from
Mar 5, 2025
Merged

Allow random-1.3 #55

merged 2 commits into from
Mar 5, 2025

Conversation

bgamari
Copy link
Contributor

@bgamari bgamari commented Mar 4, 2025

Implement uniformByteArrayM in terms of uniformByteArray. I'll admit, this seems almost too easy to be correct so do let me know if there is something I have missed.

Fixes #54.

Implement `uniformByteArrayM` in terms of `uniformByteArray`.

Fixes byorgey#54.
@bgamari
Copy link
Contributor Author

bgamari commented Mar 4, 2025

Pinging @lehins.

@byorgey
Copy link
Owner

byorgey commented Mar 4, 2025

Wow, that does seem almost too easy. I had been working on upgrading but my code was way more complicated (see haskell/random#179 ). I will take a look, but would also love any insights from @lehins .

@byorgey
Copy link
Owner

byorgey commented Mar 4, 2025

Hmm, I looked into this a bit more, and it seems very plausible! I'm glad I didn't work on my overly complex version any more.

I don't know why the CI keeps being cancelled. I try re-running it and after a few seconds it says all the checks were cancelled by me.

@RyanGlScott
Copy link

Your CI is using ubuntu-20.04 runners, which is scheduled for removal (and currently not available due to a brownout—see actions/runner-images#11101). Regenerating the .github/workflows/haskell-ci.yml file with a newer version of haskell-ci would likely fix this.

Copy link
Contributor

@lehins lehins left a comment

Choose a reason for hiding this comment

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

That is exactly it. I intended for it to have a simple implementation. Thank you @bgamari for submitting this PR. Sorry @byorgey I totally forgot that you were asking about some help defining implementation for uniformByteArrayM in MonadRandom

Implement either `uniformByteArrayM` or `uniformShortByteString` depending on the version of `random`, but not both

Co-authored-by: Alexey Kuleshevich <lehins@yandex.ru>
@byorgey byorgey merged commit 013f04f into byorgey:master Mar 5, 2025
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.

Build failure with random-1.3.0
4 participants