Safe Haskell | None |
---|---|
Language | Haskell98 |
Data.Random.RVar
Synopsis
- type RVar = RVarT Identity
- runRVar :: RandomSource m s => RVar a -> s -> m a
- data RVarT (m :: * -> *) a
- runRVarT :: (Lift n m, RandomSource m s) => RVarT n a -> s -> m a
- runRVarTWith :: RandomSource m s => (forall t. n t -> m t) -> RVarT n a -> s -> m a
Documentation
runRVar :: RandomSource m s => RVar a -> s -> m a #
Instances
MonadTrans RVarT | |
MonadPrompt Prim (RVarT n) | |
Monad (RVarT n) | |
Functor (RVarT n) | |
Applicative (RVarT n) | |
MonadIO m => MonadIO (RVarT m) | |
MonadRandom (RVarT n) | |
Defined in Data.RVar Methods getRandomPrim :: Prim t -> RVarT n t getRandomWord8 :: RVarT n Word8 getRandomWord16 :: RVarT n Word16 getRandomWord32 :: RVarT n Word32 getRandomWord64 :: RVarT n Word64 getRandomDouble :: RVarT n Double getRandomNByteInteger :: Int -> RVarT n Integer | |
Lift m n => Sampleable (RVarT m) n t Source # | |
Defined in Data.Random.Sample Methods sampleFrom :: RandomSource n s => s -> RVarT m t -> n t Source # | |
Lift (RVarT Identity) (RVarT m) Source # | |
runRVarT :: (Lift n m, RandomSource m s) => RVarT n a -> s -> m a Source #
Like runRVarTWith
, but using an implicit lifting (provided by the
Lift
class)
runRVarTWith :: RandomSource m s => (forall t. n t -> m t) -> RVarT n a -> s -> m a #