Module FileRand


module FileRand: sig  end
This generator reads raw bits from a RNG character device file, i.e., /dev/urandom.


Example usage:

module RNG = Rand.UniformDist(Math.Int32Ops)(FileRand.Int32Source(FileRand.Dev_Urandom))

class rng : string -> object  end

The sources for the Rand Distribution modules take the filename of the device as a module. Wierd, but hey. I'm fooling around with the capabilities of functors.

module type FILE = sig  end
module Dev_Urandom: FILE
module IntSource: functor (File : FILE) -> sig  end
Source for ints
module Int32Source: functor (File : FILE) -> sig  end
Source for int32s