(* Module *) module Monmodule = struct type t = A | B of int type u = char let f x = if x=A then B(0) else A let g x = x end;; f;; Monmodule.f;; Monmodule.f (Monmodule.B 10);; open Monmodule;; f;; f (B 10);; (* Signature *) module type MASIG = sig type t type u = char val g : t -> t end;; module Monmodule2 : MASIG = struct type t = A | B of int type u = char let f x = if x=A then B(0) else A let g x = x end;; Monmodule2.f;; Monmodule2.A;; Monmodule2.g;;