caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] How to define a module type for NAxioms.NAxiomsSig + Orders.UsualOrderedTypeFull + ... effectively?
@ 2016-06-30 16:28 Soegtrop, Michael
  2016-06-30 16:44 ` Soegtrop, Michael
  0 siblings, 1 reply; 2+ messages in thread
From: Soegtrop, Michael @ 2016-06-30 16:28 UTC (permalink / raw)
  To: caml-list


[-- Attachment #1.1: Type: text/plain, Size: 1487 bytes --]

Dear Coq Users,

the file Coq.NArith.BinNat contains this definition:

Module N
<: NAxiomsSig
<: UsualOrderedTypeFull
<: UsualDecidableTypeFull
<: TotalOrder.

I wonder if there is an effective way to define a Module Type with the same interface as the 4 module types given above combined? Just chaining them with <+ like this:

Module Type NatInt :=
     NAxioms.NAxiomsSig
  <+ Orders.UsualOrderedTypeFull
  <+ Equalities.UsualDecidableTypeFull
  <+ Orders.TotalOrder.

fails, because all of them contain a type t. The only way I see is to include e.g. UsualOrderedTypeFull is to include all its components as shown in this image:

[cid:image001.png@01D1D2F8.57A8D5E0]

the colored boxes are module type functors, the white ones module types including a type t. Blue are functions, red are specifications, the darker ones contain definitions/lemmas, the light ones contain parameters/axioms.

Is there a smart way of doing this without essentially copying the definition of UsualOrderedTypeFull, UsualDecidableTypeFull and TotalOrder?

Should I create Module Type functors matching all the white boxes above?

Best regards,

Michael
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

[-- Attachment #1.2: Type: text/html, Size: 5858 bytes --]

[-- Attachment #2: image001.png --]
[-- Type: image/png, Size: 11242 bytes --]

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

* RE: [Caml-list] How to define a module type for NAxioms.NAxiomsSig + Orders.UsualOrderedTypeFull + ... effectively?
  2016-06-30 16:28 [Caml-list] How to define a module type for NAxioms.NAxiomsSig + Orders.UsualOrderedTypeFull + ... effectively? Soegtrop, Michael
@ 2016-06-30 16:44 ` Soegtrop, Michael
  0 siblings, 0 replies; 2+ messages in thread
From: Soegtrop, Michael @ 2016-06-30 16:44 UTC (permalink / raw)
  To: caml-list

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

Sorry wrong list - please ignore
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

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

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

end of thread, other threads:[~2016-06-30 16:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-30 16:28 [Caml-list] How to define a module type for NAxioms.NAxiomsSig + Orders.UsualOrderedTypeFull + ... effectively? Soegtrop, Michael
2016-06-30 16:44 ` Soegtrop, Michael

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).