Update cabal + add wrapper over MWC#225
Merged
Shimuuar merged 5 commits intohaskell:masterfrom Jan 9, 2026
Merged
Conversation
Shimuuar
requested changes
Jan 4, 2026
Collaborator
Shimuuar
left a comment
There was a problem hiding this comment.
There're few comments but otherwise it's good
No. Tests are not needed. It's just a wrapper and generator is tested in mwc-random
Statistics/Distribution/Poisson.hs
Outdated
| import qualified Statistics.Distribution as D | ||
| import qualified Statistics.Distribution.Poisson.Internal as I | ||
| import Statistics.Internal | ||
| import Control.Monad (liftM) |
Comment on lines
+105
to
+107
| instance D.ContGen PoissonDistribution where | ||
| genContVar (PD lambda) gen = fromIntegral <$> MWC.poisson lambda gen | ||
|
|
Collaborator
There was a problem hiding this comment.
Please drop ContGen instance. It is discrete distribution after all
Contributor
Author
There was a problem hiding this comment.
hi @Shimuuar , i am not able to drop ContGen:
class (DiscreteDistr d, ContGen d) => DiscreteGen d where
genDiscreteVar :: (StatefulGen g m) => d -> g -> m Int
statistics/Statistics/Distribution.hs
Line 168 in b628309
Collaborator
There was a problem hiding this comment.
Indeed! Sorry I forgot about it
Contributor
Author
|
@Shimuuar , i have removed the unnecessary import. |
Collaborator
|
Thank you. 0.16.5.0 is on hackage P.S. Generally it's better to make PR from branches other than master. No need to reset master branch afterwards |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, do we need tests for this?