@@ -164,9 +164,10 @@ import System.Random.Internal
164
164
-- > [3,4,3,1,4,6,1,6,1,4]
165
165
--
166
166
-- Given a /pure/ pseudo-random number generator, you can run the monadic pseudo-random
167
- -- number computation @rollsM@ in 'StateT', 'IO', 'ST' or 'STM' context by applying a
168
- -- monadic adapter like 'StateGenM', 'AtomicGenM', 'IOGenM', 'STGenM' or 'TGenM' (see
169
- -- [monadic-adapters](#monadicadapters)) to the pure pseudo-random number generator.
167
+ -- number computation @rollsM@ in 'Control.Monad.State.Strict.StateT', 'IO', 'ST' or 'STM'
168
+ -- context by applying a monadic adapter like 'StateGenM', 'AtomicGenM', 'IOGenM',
169
+ -- 'STGenM' or 'TGenM' (see [monadic-adapters](#monadicadapters)) to the pure
170
+ -- pseudo-random number generator.
170
171
--
171
172
-- >>> let pureGen = mkStdGen 42
172
173
-- >>> newIOGenM pureGen >>= rollsM 10 :: IO [Word]
@@ -183,9 +184,9 @@ import System.Random.Internal
183
184
-- ['System.Random.RandomGen': pure pseudo-random number generators]
184
185
-- See "System.Random" module.
185
186
--
186
- -- ['StatefulGen': monadic pseudo-random number generators] These generators
187
- -- mutate their own state as they produce pseudo-random values. They
188
- -- generally live in ' StateT', 'ST', 'IO' or 'STM' or some other transformer
187
+ -- ['StatefulGen': monadic pseudo-random number generators] These generators mutate their
188
+ -- own state as they produce pseudo-random values. They generally live in
189
+ -- 'Control.Monad.State.Strict. StateT', 'ST', 'IO' or 'STM' or some other transformer
189
190
-- on top of those monads.
190
191
--
191
192
@@ -198,10 +199,10 @@ import System.Random.Internal
198
199
-- Pure pseudo-random number generators can be used in monadic code via the
199
200
-- adapters 'StateGenM', 'AtomicGenM', 'IOGenM', 'STGenM' and 'TGenM'
200
201
--
201
- -- * 'StateGenM' can be used in any state monad. With strict 'StateT' there is
202
- -- no performance overhead compared to using the 'RandomGen' instance
203
- -- directly. 'StateGenM' is /not/ safe to use in the presence of exceptions
204
- -- and concurrency.
202
+ -- * 'StateGenM' can be used in any state monad. With strict
203
+ -- 'Control.Monad.State.Strict.StateT' there is no performance overhead compared to
204
+ -- using the 'RandomGen' instance directly. 'StateGenM' is /not/ safe to use in the
205
+ -- presence of exceptions and concurrency.
205
206
--
206
207
-- * 'AtomicGenM' is safe in the presence of exceptions and concurrency since
207
208
-- it performs all actions atomically.
0 commit comments