system-random-effect 0.1.1.0 → 0.1.2.0
raw patch · 2 files changed
+8/−6 lines, 2 files
Files
src/System/Random/Effect.hs view
@@ -172,11 +172,13 @@ -- | Returns the maximum set bit in an integer. maxBit :: Integer -> Int-maxBit x =- let loop y !k- | y == 0 = k- | otherwise = loop (y `unsafeShiftR` 1) (k+1)- in loop x 0+maxBit x+ | x == 0 = 0+ | otherwise =+ let loop y !k+ | y == 1 = k+ | otherwise = loop (y `unsafeShiftR` 1) (k+1)+ in loop x 0 -- | Repeat a computation until it succeeds a test. loopUntil :: Monad m => (a -> Bool) -> m a -> m a
system-random-effect.cabal view
@@ -1,5 +1,5 @@ name: system-random-effect-version: 0.1.1.0+version: 0.1.2.0 synopsis: Random number generation for extensible effects. homepage: https://github.com/wowus/system-random-effect license: BSD3