Skip to content

Update cabal + add wrapper over MWC - #225

Merged
Shimuuar merged 5 commits into
haskell:masterfrom
daikonradish:master
Jan 9, 2026
Merged

Update cabal + add wrapper over MWC#225
Shimuuar merged 5 commits into
haskell:masterfrom
daikonradish:master

Conversation

@daikonradish

Copy link
Copy Markdown
Contributor

Hi, do we need tests for this?

@ShimuuarShimuuar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

Comment threadStatistics/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)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this import needed?

Comment on lines +105 to +107
instance D.ContGen PoissonDistribution where
genContVar (PD lambda) gen = fromIntegral <$> MWC.poisson lambda gen

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please drop ContGen instance. It is discrete distribution after all

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

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

class (DiscreteDistrd, ContGend) =>DiscreteGendwhere

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Indeed! Sorry I forgot about it

@daikonradish

Copy link
Copy Markdown
ContributorAuthor

@Shimuuar , i have removed the unnecessary import.

@Shimuuar
Shimuuar merged commit 9045465 into haskell:masterJan 9, 2026
15 checks passed
@Shimuuar

Copy link
Copy Markdown
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

Sign up for freeto 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.

2 participants

@daikonradish@Shimuuar