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