moduleTest.Framework.SeedwhereimportTest.Framework.UtilitiesimportSystem.RandomimportData.ChardataSeed=FixedSeedInt|RandomSeedinstanceShowSeedwhereshowRandomSeed="random"show(FixedSeedn)=showninstanceReadSeedwherereadsPrecprecxs=ifmaptoLowerrandom_prefix=="random"then[(RandomSeed,rest)]elsemap(FixedSeed`onLeft`)(readsPrecprecxs)where(random_prefix,rest)=splitAt6xs-- | Given a 'Seed', returns a new random number generator based on that seed and the-- actual numeric seed that was used to build that generator, so it can be recreated.newSeededStdGen::Seed->IO(StdGen,Int)newSeededStdGen(FixedSeedseed)=return$(mkStdGenseed,seed)newSeededStdGenRandomSeed=newStdGenWithKnownSeednewStdGenWithKnownSeed::IO(StdGen,Int)newStdGenWithKnownSeed=doseed<-randomIOreturn(mkStdGenseed,seed)