Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] option to disable partially qualified Require Imports

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] option to disable partially qualified Require Imports


Chronological Thread 
  • From: Ralf Jung <jung AT mpi-sws.org>
  • To: coq-club AT inria.fr, Guillaume Melquiond <guillaume.melquiond AT inria.fr>
  • Subject: Re: [Coq-Club] option to disable partially qualified Require Imports
  • Date: Fri, 18 Sep 2020 15:28:42 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jung AT mpi-sws.org; spf=Pass smtp.mailfrom=jung AT mpi-sws.org; spf=None smtp.helo=postmaster AT jupiter.mpi-klsb.mpg.de
  • Ironport-phdr: 9a23:sV51oBQ7ZRaOfB8mmogx1LkuYtpsv+yvbD5Q0YIujvd0So/mwa6zbBCN2/xhgRfzUJnB7Loc0qyK6v+mATJLv8/J8ChbNsAVCVld0YRetjdjKfbNMVf8Iv/uYn5yN+V5f3ghwUuGN1NIEt31fVzYry76xzcTHhLiKVg9fbytScbdgMutyu+95YDYbRlWizqhe7NyKwi9oRnMusUMjoZuN6Q8xgHVrnZJdOhbxH5kLk+Xkxrg+8u85pFu/zlRtv4768JMTaD2dLkkQLJFCzgrL3o779DxuxnZSguP6HocUmEInRdNHgPI8hL0UIrvvyXjruZy1zWUMsPwTbAvRDSt9LxrRwPyiCcGLDE27mfagdFtga1BoRKhoxt/w5PIYIyQKfFzcL/Rcc8cSGFcRctaSTBPDZ2gYIsOF+oBPPhXr4/hp1sVsBCyARCgCP7zxjNUg3P727Ax3eY8HgHcxAEuAswAsHrUotv2OqkdX++6w6vUwjvMdP5WxTTw5ZLUfhw9r/yBX7R9etfRx0k1EAPFi02dp5D/MDOR2OQGrmyV7/dmVeKglmUqrANxoiWpxscjkYTJg5oVylHd+SVizoc1Pse0SElhYd6rCZZdsTyROIRqTM04WW5opDo6xaMcuZ69ZCUHxpQpyhHDZvGacYWE/hbuWPufLzp7in9oZbGyiRmx/EWi1uHxV9e43EpWoydKnNTBuG0B2gDN58WJSfZx4Ems1DCS3A7Q8uFJOV04mKTfJpI737I9koAfvEfCEyPshUn7jLeae0cm9+Sy9ujqZqnqqoWBO4J1hQzyKLoiltK/DOk+LwMARXKU+f6m273m5UD5QKtFjvkxkqTBspDaONwbpq+lAwBLyIYv8RO/Dy+n0NgBnnkHKElFdwmdg4jsI1HOL+r0AuqhjFi0kTdrwe7JPqH5D5nQIHXOlK3tcat55kJGywc+zMpT649UB70ZJfL8QE7xtNjWDh8jNAy0xv7qCNdg1oMYVmKCGaqZMLvTsVOR/eIuLfKMaJUSuDbnJPgp/+TugmMhmV8BYamp2oMaaHWmEfRiOkWZfHvsgtAHEWoRvws+Tenqh0aYUTFJfXqyXqQ85is6CI28F4vDSJqtiqSb3CinBp1WenxGCleUHHj0cIWEQu4AZz6WIs98iTMJTqOhSo8k1RG2rgD20btnLuzO+i0Zr53vztZ15/eA3S01oDdzFoGW13yHZ2ByhGIBATEsmOhQvE15zl6e1KUwpvFcDMFS4PVFGlM1KJ/Yy+VnDt20Xw/FZ8qIT1CqatSgGzA4CNwrlYwgeUF4Tu+rih6L/TesDPdBlaGNC7Qx6qOZxGfqYcFnxCCVh+Eak1A6T54XZiWdjall+l2WXtaRyhnLp+ORba0ZmRX12iKb12PX5xNdSA81SrreG3cFaRmO9IWr1gb5V7arTI8fHE5EwM+GJLFNb4Sy31BeRbL4J8+YZHi+yT7pWES4g4iUZY+vQF0zmSXQDE9ezlIR4G6HKQUkQCK5oifdCCdkU1f3bAXg/LsmpQ==

Hi Guillaume,


On 18.09.20 14:44, Guillaume Melquiond wrote:
> Le 18/09/2020 à 14:18, Gaëtan Gilbert a écrit :
>> We perhaps could add a syntax with leading dot, so in
>>
>>     Require .Foo.Bar Baz.
>>
>> Foo.Bar is fully qualified, Baz isn't.
>>
>> (kind of like internet domain names with trailing dot)
>
> Another possibility would be to relax some requirements of From-Require.
> Currently, "From A.B.C Require D.E.F" means that not only the path
> should start with A.B.C and finish with D.E.F, but also that there
> should be no overlap between A.B.C and D.E.F. If the second constraint
> was removed, then Require would become non-ambiguous for people who have
> to use messy libraries.

I don't see how accepting even more paths for a given import can possibly
resolve any ambiguities? "From A.B.C Require A.B.C" would then match both
"A.B.C" and "A.B.C.*.A.B.C".

Also I think having unambiguous identifiers is important in general, no matter
how messy the library. If anything I'd argue that the Coq standard library is
messy if it requires such interesting import semantics. After all, to pick a
random example, when I refer to lemma "foo" in Coq it also doesn't just pick
any
lemma that has "foo" somewhere in its name -- it tests for equality, not a
substring. That would be a rather obscure way of name resolution. The Coq
import
semantics are just as obscure in my eyes.

But I understand this is very hard to change now. I am still curious how we
even
got here -- is this import semantics inherited from some other language, or
did
Coq introduce it?

Kind regards,
Ralf



Archive powered by MHonArc 2.6.19+.

Top of Page