snoyberg / classy-prelude

A typeclass-based Prelude.
108 stars 15 forks source link

Include random number generation code #12

Closed snoyberg closed 11 years ago

snoyberg commented 11 years ago

Not sure which library to include here

nikita-volkov commented 11 years ago

See this. Although I have to say that no matter what I'm still using the standard one primarilly, because no other library provides api as convenient as this. Most times all I need is randomIO or randomRIO functionality.

gregwebs commented 11 years ago

I don't feel that random number generation is something classy-prelude must have since most applications have no need for random numbers (of course many applications do use libraries that use random number generators).

gregwebs commented 11 years ago

here is an example of abstracting over randomness: http://hackage.haskell.org/package/random-fu-0.2.4.0/docs/Data-Random.html

I don't think we could do anything other than export a random generator that exists in base (which is probably slow and not as nice as external packages).