Skip to content

Commit

Permalink
Implement new uniformByteArrayM
Browse files Browse the repository at this point in the history
  • Loading branch information
lehins committed Oct 30, 2023
1 parent daba99c commit 6d11ba7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions System/Random/MWC.hs
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,10 @@ 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 #-}
#endif
uniformShortByteString n g = stToPrim (Random.genShortByteStringST n (uniform g))
{-# INLINE uniformShortByteString #-}

Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ packages:

extra-deps:
- github: haskell/random
commit: 81161a22de4bbc8de51af6e811eef8311b05ccc0
commit: 04a50941c8e1ebdac0e01f4354eae965c5adfa50
allow-newer: true

0 comments on commit 6d11ba7

Please sign in to comment.