Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (14 sloc) 0.469 kb
-- Enthropy source for dieharder tests.
-- See for details
import Control.Monad (forever)
import Data.Word (Word32)
import System.IO (hPutBuf,stdout)
import Foreign.Marshal.Alloc (alloca)
import Foreign.Storable (poke)
import System.Random.MWC
main :: IO ()
main =
withSystemRandom $ \gen -> forever $ do
alloca $ \p -> do
poke p =<< (uniform gen :: IO Word32)
hPutBuf stdout p 4
Jump to Line
Something went wrong with that request. Please try again.