aivika-branches 0.2 → 0.3
raw patch · 3 files changed
+15/−4 lines, 3 filesdep +mwc-randomdep ~aivikadep ~aivika-transformersPVP ok
version bump matches the API change (PVP)
Dependencies added: mwc-random
Dependency ranges changed: aivika, aivika-transformers
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−0
- Simulation/Aivika/Branch/Generator.hs +5/−1
- aivika-branches.cabal +4/−3
CHANGELOG.md view
@@ -1,4 +1,10 @@ +Version 0.3+-----++* Using the mwc-random package for generating random numbers by default.++ Version 0.2 -----
Simulation/Aivika/Branch/Generator.hs view
@@ -17,6 +17,7 @@ import Control.Monad import Control.Monad.Trans +import qualified System.Random.MWC as MWC import System.Random import Data.IORef@@ -67,7 +68,10 @@ newGenerator tp = case tp of SimpleGenerator ->- liftIO newStdGen >>= newRandomGenerator+ do let g = MWC.uniform <$>+ MWC.withSystemRandom (return :: MWC.GenIO -> IO MWC.GenIO)+ g' <- liftIO g+ newRandomGenerator01 (liftIO g') SimpleGeneratorWithSeed x -> error "Unsupported generator type SimpleGeneratorWithSeed: newGenerator" CustomGenerator g ->
aivika-branches.cabal view
@@ -1,5 +1,5 @@ name: aivika-branches-version: 0.2+version: 0.3 synopsis: Nested discrete event simulation module for the Aivika library description: This package extends the aivika-transformers [1] library and allows creating branches to run@@ -50,8 +50,9 @@ mtl >= 2.1.1, containers >= 0.4.0.0, random >= 1.0.0.3,- aivika >= 5.1,- aivika-transformers >= 5.1+ mwc-random >= 0.13.0.0,+ aivika >= 5.2,+ aivika-transformers >= 5.2 extensions: TypeFamilies, MultiParamTypeClasses,