coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Gregory Malecha <gregory AT bedrocksystems.com>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] option to disable partially qualified Require Imports
- Date: Thu, 17 Sep 2020 17:00:25 -0400
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=gregory AT bedrocksystems.com; spf=None smtp.mailfrom=gregory AT bedrocksystems.com; spf=None smtp.helo=postmaster AT mail-pf1-f179.google.com
- Ironport-phdr: 9a23:SlfFOBTTsETogCY9TKNCnr3+ftpsv+yvbD5Q0YIujvd0So/mwa6yYxCN2/xhgRfzUJnB7Loc0qyK6v+mATBLuM/f+DBaKdoQDkFD0Z1X1yUbQ+e9QXXhK/DrayFoVO9jb3RCu0+BDE5OBczlbEfTqHDhpRQbGxH4KBYnbr+tQt2agMu4zf299IPOaAtUmjW9falyLBKrpgnNq8Uam4RvJrszxxfTvndFdOtayX51KV+Sgh3w4tu88IN5/ylfpv4s9tRMXbnmc6g9ULdVECkoP2cp6cPxqBLNVxGP5nwSUmUXlhpHHQ3I5wzkU5nyryX3qPNz1DGVMsPqQ780Xy+i77pwRx/zlCgHLT85/3rJhcF2kalWvQiupx17w47TfYGVKP9zdb7TcN8GWWZMWNtaWipcCY2+coQPFfIMMulWr4b/p1UAoxiwCxSyCuzz0TJHnGP60Lcg3ug9DQ3L3gotFM8OvnTOq9X1Mb8fX+GvzKbWwjXDaOlW2Dfg44bPaB8hpe+DUq5wccXL1EIiEAzFjk+OpozqODOVzOQMvnOA4OV+SO2vkWknpB1yoji0xsYskZXJiZwQylDf7yl23IE1JdihRUN9fNWrH4deuTuAOItqXsMtXXtouCAix7AIt5C1cjYHxIg7yhPDaPGKbpWE7B3jWeuVLzp1hn1odK6wiRu2/kat1vPwWMe63lhKsiZIjt3Bu38R2xHP9sWKTOZ28ES52TuXyQzf9uVJLVo3mKfbMZIt3KM8moYJvUjeHCL7nEP7h7KMeEo+4Oin8eHnb63mppCCM490jRnzMqE0lcy+BeQ0KxAOX2aG9eil2r3v4E/0TbFQgv05lanZt5/aJcAFqaKjHwBV1YMj5w6+DzegztsYgWEKIExZdB+DlYTkOFHDLOrmAfuin1igiipnyvLCM7H5B5XCNHnDkLPvfbZn7E5czRI+zd9F551KBbEBJ+jzW0/qudPDEBA2Lha0w+H7B9V+zYMfWXmPArOHP6PXql+E/P4gI+6JZIMNojbyN+Al5+LyjX8+gVISYa6p3YIOZH+kGvRmPl6WbGH3gtYBFGcKphAxQPbriF2ESz5TZmy9U7gy5jEhW8qaCtLIQZnoi7ic1g+6GIdXbyZIEAOiC3DtIqqeVvgLcjPaB8ZlnzcEXPD1RJUs2ha0pSfwxrZ9KeHX4TwDqZ/mz55+4OiFxkJ6ziB9E8nIizLFdGpzhG5dH2ZqjpA6mlR0zxK46YY9m+ZRT4QB7f5FSAAxNoXN1PB3Dsu0UQXELI/QFQSWB+6+CDR0deofht8DZ0EnRYenhxHHmjKkWvobzuPaQpMz9a3Y0j76IMMvky+XhplktEEvR450DUPjg6d+8wbJAIuTyxeTmqqwcq8fxz/W6GqG1iyFu0QKCAM=
I'd like to add my voice to Ralf's "vote" above. I think that fuzzy matching is an artifact of the somewhat ad-hoc naming in the standard library, e.g. Coq.Lists.List, etc, and it is something that should ultimately go away sooner rather than later in my opinion. In addition to the benefits listed above, you could probably do a lot more with build tooling with exact matching, and that would likely address some (if not all) of the topics that Abhishek has brought up in the past.
On Thu, Sep 17, 2020 at 11:41 AM Ralf Jung <jung AT mpi-sws.org> wrote:
Hi,
> Le 17/09/2020 à 16:19, Abhishek Anand a écrit :
>> I used to think that using disjoint logical prefixes for different
>> libraries and always using fully qualified names in Require Imports
>> would suffice for avoiding errors due to incorrect files being imported.
>> However, it was recently pointed out to me that this is not sufficient:
>> Suppose we have 2 .vo files, one with fully qualified name A.B.C and
>> another with fully qualified name B.C.
>> Now we suddenly have no reliable way to Import the latter file unless
>> there is a way to tell `Require Import` that the name should be
>> interpreted in a fully qualified manner.
>> Is there a workaround for this?
>
> You can use:
>
> From A Require B.C.
> From B Require C.
>
> If you have three files named A.C, A.B.C, and B.A.C, then there is no
> foolproof way to load A.C. But this is the author of library A being
> malicious. Just stop using library A.
I cannot see any malice here, maybe just slightly messy naming.
But Coq should support unambiguous imports no matter how messy or questionable
the naming choices of any library involved are.
I've had quite weird problems in the past caused by stale .vo files being picked
up by ambiguous imports, so I'd be all for a way to ensure that all imports are
unambiguous. (In fact I am quite surprised that ambiguous imports exist at all,
that seems quite contrary to Coq's usual design geared towards precision. No
other language I work or worked with has ambiguous imports the way Coq does --
Python, Java, C++, Rust all do not have this problem.)
Kind regards,
Ralf
--
Gregory Malecha
Mail: gregory AT bedrocksystems.com
BedRock
Systems Inc
UNBREAKABLE FOUNDATION
FOR
- [Coq-Club] option to disable partially qualified Require Imports, Abhishek Anand, 09/17/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Théo Zimmermann, 09/17/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Guillaume Melquiond, 09/17/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Ralf Jung, 09/17/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Gregory Malecha, 09/17/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Théo Zimmermann, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Ralf Jung, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Théo Zimmermann, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Gaëtan Gilbert, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Guillaume Melquiond, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Ralf Jung, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Guillaume Melquiond, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Abhishek Anand, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Ralf Jung, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Andrew Appel, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Gaëtan Gilbert, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Théo Zimmermann, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Ralf Jung, 09/18/2020
- Re: [Coq-Club] option to disable partially qualified Require Imports, Ralf Jung, 09/17/2020
Archive powered by MHonArc 2.6.19+.