Module Core_extended.Number

module type Spec : sig ... end

Specification of general number properties

module type Verified_spec : sig ... end

Specification of numbers with constraint checks

module type S : sig ... end

Signature of numbers that have a verified (t) and unverified (repr) representation and a function to verify the latter.

module type S0 : sig ... end

Signature of numbers that also have a zero

module Make_verified : functor (Spec : Verified_spec) -> S with type repr = Spec.t with type t = private Spec.t

Functor for making constrained numbers from specifications. This functor enforces the invariant through a private type.

module Make_verified_unsafe : functor (Spec : Verified_spec) -> S with type repr = Spec.t with type t = Spec.t

Same as Make_verified, but does not enforce invariants. Useful for extending verified numbers with more features before "sealing" the type with a private declaration.

module type Verified_std_spec : sig ... end

Specification used for standard numbers (Int.t, Int32.t, Int63.tInt64.t, Nativeint.t, Float.t) to enrich them with Pos.t, Pos0.t, Neg.t, and Neg0.t modules, and the Make_bounded and Make_bounded_unsafe functors.

module type Verified_std : sig ... end

Signature of standard numbers (Int.t, Int32.t, Int63.tInt64.t, Nativeint.t, Float.t) to enrich them with Pos.t, Pos0.t, Neg.t, and Neg0.t modules, and the Make_bounded and Make_bounded_unsafe functors.

module Make_verified_std : functor (Spec : Verified_std_spec) -> Verified_std with type repr = Spec.t

Functor for enriching standard numbers (Int.t, Int32.t, Int63.tInt64.t, Nativeint.t, Float.t) with Pos.t, Pos0.t, Neg.t, and Neg0.t modules, and the Make_bounded and Make_bounded_unsafe functors.