Hello all,
Is it possible to extend module A
so that it contains new functions using type s
below?
(* a.ml *)
module A = struct
type t = ...
end
type s = A.t * A.t
(* Would like to add a function 'make_s' that uses type s to module A *)
module A = struct (* << This doesn't work because it causes 'Multiple definition of the module name A' error. *)
include A
let make_s (x: t): s = (x, x)
end
If creating a .mli file could be avoided it will be the best solution, but if it is unavoidable I am happy with the solution.
Thanks again,