On Fri, Oct 28, 2016 at 9:01 AM, Nicolas Ojeda Bar <nicolas.ojeda.bar@lexifi.com> wrote:One approach is to name the *output* signature of the functors:module type EQ_PROD_S = sigmodule X : EQmodule Y : EQtype t = X.t * Y.tval eq: t * t -> boolendSorry to be a bother. Got another one for you Nicolas!
How do I achieve the intent of this:module type EQ = sigtype tval eq : t * t -> boolendmodule type NUM = sigtype tval from_int : int -> tval ( + ) : t -> t -> tendmodule type MUL_S = sigmodule N : NUMmodule E : EQ with type t := N.ttype t = N.tval mul : t -> t -> tendmodule type MUL = functor (E : EQ) (N : NUM) -> MUL_S with module N := N and module E := EThe idea is that the modules satisfying EQ and NUM must agree in their type t and MUL brings them together and adds a 'mul' function.--Shayne Fletcher