coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- 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
- [Coq-Club] I do not really understand coq modules, any ideas?, Chris Dams, 11/03/2021
- Re: [Coq-Club] I do not really understand coq modules, any ideas?, Guillaume Melquiond, 11/03/2021
- Re: [Coq-Club] I do not really understand coq modules, any ideas?, Madhukar, 11/03/2021
- Re: [Coq-Club] I do not really understand coq modules, any ideas?, Raphaël Cauderlier, 11/03/2021
- Re: [Coq-Club] I do not really understand coq modules, any ideas?, Chris Dams, 11/03/2021
- Re: [Coq-Club] I do not really understand coq modules, any ideas?, Chris Dams, 11/05/2021
- Re: [Coq-Club] I do not really understand coq modules, any ideas?, Gaëtan Gilbert, 11/05/2021
- Re: [Coq-Club] I do not really understand coq modules, any ideas?, Sylvain Boulmé, 11/05/2021
- Re: [Coq-Club] I do not really understand coq modules, any ideas?, Chris Dams, 11/05/2021
Archive powered by MHonArc 2.6.19+.