coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Gaëtan Gilbert <gaetan.gilbert AT skyskimmer.net>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] option to disable partially qualified Require Imports
- Date: Fri, 18 Sep 2020 14:18:25 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=gaetan.gilbert AT skyskimmer.net; spf=Pass smtp.mailfrom=gaetan.gilbert AT skyskimmer.net; spf=None smtp.helo=postmaster AT relay11.mail.gandi.net
- Ironport-phdr: 9a23:Du03hxFaXCnRf76vVmFSbp1GYnF86YWxBRYc798ds5kLTJ7yos+wAkXT6L1XgUPTWs2DsrQY0rWQ6/6rBTJIoc7Y9ixbLtoUD15NoP5VtjRoONSCB0z/IayiRA0BN+MGamVY+WqmO1NeAsf0ag6aiHSz6TkPBke3blItdaz6FYHIksu4yf259YHNbAVUnjq9Zq55IAmroQnLucQanIlvJrwtxhbIrXdFdOVbzn5sKV6Pghrw/Mi98INi/ihKp/4t68tMWrjmcqolSrBVEC4oOH0v6s3xshnDQwqP5n8CXWgTjxFFHQvL4gzkU5noqif1ufZz1yecPc3tULA7Qi+i4LtxSB/pkygIKTg0+3zKh8NqjaJbpBWhpwFjw4PRfYqYOuZycr/bcNgHQ2dKQ8RfWDFbAo6kcoUBEeQBM+ZboYfzqVQBohmxChWjCu701j9FhWX70bEm3+kvEwzL2hErEdIUsHTTqdX4LKYcXvqpy6nU1zrDaetZ1zb86IjMaR8uv+uMXa5tesfWxkkgDR3KjkmKpozjJT+V2eUNs2yA4OV+T+Kvl3Uqqxpyojmv3ccsiYjJhocQyl/a7yV12oA1KsOkSENiZ9OvDZRfuT2AOYRsXsMiX39nuDw8yrAeuJO2fjQHxIg5yhPcdfGJfZSF7wz9WeuePzp2hG9oda69ihi9/kWuxe3xW8m23VhFsCdLndnCum4T2hLd5caJRf1w9Vqv1zaI0gDc8OBEIUYsmKreM54hw6c8loEdsETYBCP2n1/2jKCQe045+eao8/zqbqv7qpKeLYN5iB3yPr4zlsG9Auk0KBYCUmaG9eikybHu80L0TK9XgvAyiKXVrZLXKMABqqKkAQJY1oAu4AulATi8ytQXh3wHIUpFeB2Zi4jpPEnDIOrmAve7mVutkCpny+3cMr3kGJrNL3zDnK3ufbln7U5T1QszwcpZ551KFrENOPPzWknvu9zEFhI1LRG4zuT9BNh/yo8SQ3+DD62aPa/Ir1OF6P8jL/GJZIAPuTb9L/Yl5+TpjX88gVIdcrOm0oULaH+iGPRqOUqZYXvogtgaD2gKpBY+QffxiF2BUT9TfHWyX6M55jE+Fo2mF53PRoazj7ydxCu7BIFZZnhaClCQFnflb5mLW/AVaC6LPsBhliEEWqO6Ro861RCusRf6xKB9IurV/C0Yr5Pj28Jv6+3djxFhvQBzWs+ayiSGS3x+tmIOXT4/mq5l8mJnzVLW/qH7n/VeIvNS4/lESBtyYZHVwvBzDZb9WwbLc82VYE2lU86lADQ0Q8h3xdISNRUuU+6+hwzOinL5S4QekKaGUcRto/DsmkPpLsM48E7okawojl0oWMxKbDP0na1u7AvSAovEiQOfmrr4LP1Ajh6Iz3+KyC+1hG8dSBR5CPuXRnMOfUjXqNH0/AXEQqP8Ue16YDsE8taLL+5xUvOsjVhCQ62/as7TZ2ugwj72AB+JwvWDZYzmeiMb0TmPUEU=
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)
Gaëtan Gilbert
On 18/09/2020 13:48, Théo Zimmermann wrote:
Hi Ralf,
I was only talking about the "stale vo" problem indeed.
The approach of Coq developers regarding this ambiguous import feature
so far has been to encourage users to systematically use the From
clause and to encourage library authors to avoid having several
modules named the same under a shared namespace.
Anyway, anyone, feel free to open a feature request on Coq's bug
tracker regarding this flag to disable partially qualified Require.
But I don't think we will be able to turn such a flag on by default as
long as the standard library is organized the way it is today. Feel
free also to prepare a CEP if you see a path that could lead Coq to
move away from the ambiguous import "feature" without suddenly
increasing the verbosity of every Coq file. As often, design is the
hard part.
Kind regards,
Théo
Le ven. 18 sept. 2020 à 13:26, Ralf Jung <jung AT mpi-sws.org> a écrit :
Hi Théo,
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.)
With Dune, this won't be an issue anymore.
Given that Dune is a build system, how can it add the missing language feature
of precisely specifying which file to import?
It might help against the "stale vo" problem, but that was just an example.
There are many more reasons for wanting imports to be unambiguous, like being
sure ones code keeps compiling and doing the right thing when more modules are
added.
Kind regards,
Ralf
--
Website: https://people.mpi-sws.org/~jung/
- [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, Andrew Appel, 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, Gaëtan Gilbert, 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, 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+.