Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] I do not really understand coq modules, any ideas?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] I do not really understand coq modules, any ideas?


Chronological Thread 
  • From: Guillaume Melquiond <guillaume.melquiond AT inria.fr>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] I do not really understand coq modules, any ideas?
  • Date: Wed, 3 Nov 2021 15:34:40 +0100
  • Ironport-hdrordr: A9a23:7J/Jm6v3peRz8UECc8iaXRDb7skDVNV00zEX/kB9WHVpm62j5qWTdZEgv3LJYVkqNE3I9eruBED4ewK6yXcX2/hyAV7BZmnbUQKTRelfBO3ZrQEIcBeOldK1u50AT0FIMqyVMbErt63HCdGDYqwdKQO8gdiVbDrlvg5QpN1RGtpdBtlCe3um+iIffnghOaYE

Le 03/11/2021 à 15:09, Chris Dams a écrit :
Anyone any ideas about this? Am I misusing the module system terribly?

My advice will presumably be unsatisfying, but, as a rule of thumb, never put an inductive definition inside a module. On your example, it is trivial to move flups outside, since it does not depend on T. But even if it was, just parametrize it and move it outside. Something like

Inductive flups {S:Set}: Set := flups1 | flups2 (x:S).

Module Module1 (T: Thing).
Definition flups := @flups T.S.
End Module1.

Best regards,

Guillaume



Archive powered by MHonArc 2.6.19+.

Top of Page