package safemoney

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Discrete.MakeSource

Parameters

module Qv : Qv_intf.S
module Zv : Zv_intf.S

Signature

Sourceexception ScaleTypeMismatch of string
Sourcemodule Scale : sig ... end
Sourcetype t = {
  1. scale : Scale.t;
    (*

    Scale Setting

    *)
  2. value : Zv.t;
    (*

    Integer Value

    *)
}

Types

Sourcetype showable = {
  1. scale_ : string;
  2. value_ : string;
}

showable for t

Sourceval showable_to_yojson : showable -> Yojson.Safe.t
Sourceval sexp_of_showable : showable -> Sexplib0.Sexp.t
Sourceval showable_of_sexp : Sexplib0.Sexp.t -> showable
Sourceval make_dv : (Scale.t * Zv.t) -> t

Construction

Construct discrete value

Sourceval show_scale : t -> unit

Print the scale setting

Sourceval show_val : t -> unit

Print the integer value

Sourceval show_t : t -> unit

Print the discrete value

Sourceval neg : t -> t

Negate a discrete integer value

Sourceval abs : t -> t

Return an absolute discrete integer value

Sourceval (+) : t -> t -> t

Add two discrete integer values

Sourceval (-) : t -> t -> t

Substract two discrete integer values

Sourceval (*) : t:t -> value:Zv.t -> t

Multiply two discrete integer values

Sourceval to_showable_json : t -> string

Convert t to showable rep

OCaml

Innovation. Community. Security.