sig
  module type RNGSource =
    sig
      type t
      val genrand : unit -> Rand.RNGSource.t
      val min : Rand.RNGSource.t
      val max : Rand.RNGSource.t
    end
  module S2USSource :
    functor (Ops : Math.Ops->
      functor
        (Source : sig
                    type t = Ops.t
                    val genrand : unit -> Rand.RNGSource.t
                    val min : Rand.RNGSource.t
                    val max : Rand.RNGSource.t
                  end->
        sig
          type t = Ops.t
          val genrand : unit -> Rand.RNGSource.t
          val min : Rand.RNGSource.t
          val max : Rand.RNGSource.t
        end
  module SysSource :
    sig
      type t = int
      val genrand : unit -> Rand.RNGSource.t
      val min : Rand.RNGSource.t
      val max : Rand.RNGSource.t
    end
  module SysFloatSource :
    sig
      type t = float
      val genrand : unit -> Rand.RNGSource.t
      val min : Rand.RNGSource.t
      val max : Rand.RNGSource.t
    end
  module type IDIST =
    functor
      (Ops : sig
               type t
               and num_type = Math.integer
               val add : t -> t -> t
               val sub : t -> t -> t
               val succ : t -> t
               val pred : t -> t
               val mul : t -> t -> t
               val div : t -> t -> t
               val rem : t -> t -> t
               val abs : t -> t
               val zero : t
               val one : t
               val min : t
               val max : t
               val print : out_channel -> t -> unit
               val to_float : t -> float
               val of_float : float -> t
             end->
      functor
        (Source : sig
                    type t = Ops.t
                    val genrand : unit -> Rand.RNGSource.t
                    val min : Rand.RNGSource.t
                    val max : Rand.RNGSource.t
                  end->
        sig
          type t = Source.t
          val min : Rand.IDIST.t
          val max : Rand.IDIST.t
          class rng :
            Rand.IDIST.t ->
            Rand.IDIST.t ->
            object
              method genrand : Rand.IDIST.t
              method max : Rand.IDIST.t
              method min : Rand.IDIST.t
            end
        end
  module UniformDist : IDIST
  module UniformDist2 : IDIST
  module type IFDIST =
    functor
      (Ops : sig
               type t
               and num_type = Math.integer
               val add : t -> t -> t
               val sub : t -> t -> t
               val succ : t -> t
               val pred : t -> t
               val mul : t -> t -> t
               val div : t -> t -> t
               val rem : t -> t -> t
               val abs : t -> t
               val zero : t
               val one : t
               val min : t
               val max : t
               val print : out_channel -> t -> unit
               val to_float : t -> float
               val of_float : float -> t
             end->
      functor
        (Source : sig
                    type t = float
                    val genrand : unit -> Rand.RNGSource.t
                    val min : Rand.RNGSource.t
                    val max : Rand.RNGSource.t
                  end->
        sig
          type t = Ops.t
          val min : Rand.IFDIST.t
          val max : Rand.IFDIST.t
          class rng :
            Rand.IFDIST.t ->
            object
              method genrand : Rand.IFDIST.t
              method max : Rand.IFDIST.t
              method min : Rand.IFDIST.t
            end
        end
  module GeometricDist : IFDIST
  module PoissonDist : IFDIST
  module type FDIST =
    functor
      (Source : sig
                  type t = float
                  val genrand : unit -> Rand.RNGSource.t
                  val min : Rand.RNGSource.t
                  val max : Rand.RNGSource.t
                end->
      sig
        type t = float
        class rng :
          object
            method genrand : Rand.FDIST.t
            method max : Rand.FDIST.t
            method min : Rand.FDIST.t
          end
        val min : Rand.FDIST.t
        val max : Rand.FDIST.t
      end
  module NormalDist : FDIST
  module ExponentialDist :
    functor
      (Source : sig
                  type t = float
                  val genrand : unit -> Rand.RNGSource.t
                  val min : Rand.RNGSource.t
                  val max : Rand.RNGSource.t
                end->
      sig
        type t = float
        val min : Rand.ExponentialDist.t
        val max : Rand.ExponentialDist.t
        class rng :
          Rand.ExponentialDist.t ->
          object
            method genrand : Rand.ExponentialDist.t
            method max : Rand.ExponentialDist.t
            method min : Rand.ExponentialDist.t
          end
      end
end