packages feed

mwc-random-monad 0.7.3.0 → 0.7.3.1

raw patch · 2 files changed

+14/−2 lines, 2 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- System.Random.MWC.Monad: runWithSystemRandom :: (MonadPrim m, BasePrimMonad m ~ m) => Rand m a -> IO a
+ System.Random.MWC.Monad: runWithSystemRandom :: (PrimBase m, BasePrimMonad m ~ m) => Rand m a -> IO a

Files

System/Random/MWC/Monad.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP              #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies     #-} -- |@@ -44,6 +45,9 @@ import Control.Monad.IO.Class    (MonadIO(..)) import Control.Monad.ST          (ST) import Control.Monad.Primitive   (PrimState)+#if MIN_VERSION_primitive(0,6,0)+import Control.Monad.Primitive   (PrimBase)+#endif import Control.Monad.Primitive.Class (MonadPrim(..))  import Data.Word               (Word32)@@ -127,7 +131,15 @@ -- | Run monad using seed obtained from system's fast source of --   pseudo-random numbers ("\/dev\/urandom" on Unix-like --   systems). @m@ must be either IO or ST.-runWithSystemRandom :: (MonadPrim m, BasePrimMonad m ~ m) => Rand m a -> IO a+runWithSystemRandom+  :: (+#if MIN_VERSION_primitive(0,6,0)+       PrimBase m+#else+       MonadPrim m+#endif+     , BasePrimMonad m ~ m+     ) => Rand m a -> IO a runWithSystemRandom rnd = do   MWC.withSystemRandom $ \g -> runRand rnd g {-# INLINE runWithSystemRandom #-}
mwc-random-monad.cabal view
@@ -1,5 +1,5 @@ Name:                mwc-random-monad-Version:             0.7.3.0+Version:             0.7.3.1 License:             BSD3 License-file:        LICENSE Author:              Alexey Khudyakov <alexey.skladnoy@gmail.com>