Module
Control.Monad.Gen.Class
- Package
- purescript-gen
- Repository
- purescript/purescript-gen
#MonadGen Source
class (Monad m) <= MonadGen m where
A class for random generator implementations.
Instances should provide implementations for the generation functions that return choices with uniform probability.
Members
chooseInt :: Int -> Int -> m Int
chooseFloat :: Number -> Number -> m Number
Chooses an floating point number in the specified (inclusive) range.
chooseBool :: m Boolean
Chooses a random boolean value.
resize :: forall a. (Size -> Size) -> m a -> m a
Modifies the size state for a random generator.
sized :: forall a. (Size -> m a) -> m a
Runs a generator, passing in the current size state.
Chooses an integer in the specified (inclusive) range.