caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Functor signature "inheritance"
@ 2016-10-28 12:44 Shayne Fletcher
  2016-10-28 13:01 ` Nicolas Ojeda Bar
  0 siblings, 1 reply; 16+ messages in thread
From: Shayne Fletcher @ 2016-10-28 12:44 UTC (permalink / raw)
  To: caml-list@inria.fr users

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]

If one wants to include a functor signature in another...

module type EQ = sig
  type t
  val eq : t * t -> bool
end

module type EQ_PROD = functor (X : EQ) (Y : EQ) ->
sig
    type t = X.t * Y.t
    val eq : t * t -> bool
  end

module type ORD = sig
  include EQ
  val lt : t * t -> bool
end

module type LT_PROD = functor (X : EQ) (Y : EQ) ->
sig
  include EQ_PROD (*What do I say here?*)
end

​... How does one do that? Is there a syntax for this sort of thing?​

-- 
Shayne Fletcher

[-- Attachment #2: Type: text/html, Size: 2187 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-10-29 18:43 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-28 12:44 [Caml-list] Functor signature "inheritance" Shayne Fletcher
2016-10-28 13:01 ` Nicolas Ojeda Bar
2016-10-28 13:04   ` Shayne Fletcher
2016-10-28 13:14   ` Shayne Fletcher
2016-10-28 13:25     ` Nicolas Ojeda Bar
2016-10-28 13:28       ` Shayne Fletcher
2016-10-28 13:47         ` rixed
2016-10-28 13:55           ` Shayne Fletcher
2016-10-28 15:44             ` Gabriel Scherer
2016-10-29  1:59               ` Shayne Fletcher
2016-10-28 16:12         ` Shayne Fletcher
2016-10-28 16:16           ` Shayne Fletcher
2016-10-28 16:17             ` Shayne Fletcher
2016-10-28 16:17           ` Nicolas Ojeda Bar
2016-10-28 16:36             ` Shayne Fletcher
2016-10-29 18:43       ` Shayne Fletcher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).