package stdint

  1. Overview
  2. Docs

Source file infix.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
module type IntSig = sig
  type t
  val add : t -> t -> t
  val sub : t -> t -> t
  val mul : t -> t -> t
  val div : t -> t -> t
end

module type S = sig
  type t
  val ( + ) : t -> t -> t
  val ( - ) : t -> t -> t
  val ( * ) : t -> t -> t
  val ( / ) : t -> t -> t
end

module Make (I : IntSig) = struct
  type t = I.t

  let ( + ) = I.add
  let ( - ) = I.sub
  let ( * ) = I.mul
  let ( / ) = I.div
end

OCaml

Innovation. Community. Security.