diff --git a/System/Random/MWC.hs b/System/Random/MWC.hs index 38bd72d..8744fd7 100644 --- a/System/Random/MWC.hs +++ b/System/Random/MWC.hs @@ -465,8 +465,13 @@ instance (s ~ PrimState m, PrimMonad m) => Random.StatefulGen (Gen s) m where {-# INLINE uniformWord32 #-} uniformWord64 = uniform {-# INLINE uniformWord64 #-} +#if MIN_VERSION_random(1,3,0) + uniformByteArrayM isPinned n g = stToPrim (Random.genByteArrayST isPinned n (uniform g)) + {-# INLINE uniformByteArrayM #-} +#else uniformShortByteString n g = stToPrim (Random.genShortByteStringST n (uniform g)) {-# INLINE uniformShortByteString #-} +#endif -- | @since 0.15.0.0 instance PrimMonad m => Random.FrozenGen Seed m where