haskell-numerics / random-fu

A suite of Haskell libraries for representing, manipulating, and sampling random variables
42 stars 21 forks source link

random-source Hackage release (and deprecation?) #93

Open nh2 opened 10 months ago

nh2 commented 10 months ago

Hi,

could you make a new Hackage release to https://hackage.haskell.org/package/random-source that includes the recently-merged upper bound fixes?

Also, on that page it says Deprecated, but without explanation.

Could you either remove the deprecation, or add some details / info on what should be used instead?

Thanks and best greetings!

nh2 commented 10 months ago

Some confusion: Some PRs such as https://github.com/haskell-numerics/random-fu/pull/91/files fix only other packages and don't fix random-source, that one still has base >= 4 && <4.16.

That said, https://github.com/haskell-numerics/random-fu/pull/82/files is supposed to add ghc9.2.2. compatibility, which has base-4.16.1.0, which is incompatible with the above constraint.

Should random-source work here?

nh2 commented 10 months ago

Looks like https://github.com/haskell-numerics/random-fu/commit/82d8fb17f4fc752802da703e2da711051cc2228e is some hint on transition paths away from random-source. See also https://github.com/haskell-numerics/random-fu/pull/67

idontgetoutmuch commented 10 months ago

I can look at this tomorrow - I was away in Australia for a few weeks

idontgetoutmuch commented 10 months ago

I have remembered some of the history. random-source is deprecated and you should use random or mwc-random or potentially anything else that supports the StatefulGen typeclass (e.g. https://hackage.haskell.org/package/mwc-random-0.15.0.2/docs/System-Random-MWC.html#g:1)

See also my thoughts from last year https://github.com/haskell-numerics/random-fu/issues/83#issuecomment-1193267644. Sadly I have made no progress on this although I do now have time. I think beefing up mwc-random is going to be the simplest for now. So the idea would be you can use mwc-random just for distributions and not the actual MWC algorithm.

I'd love to improve monad-bayes to be the replacement for random-fu but I don't have the time to do this.