coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Maxime Dénès <mail AT maximedenes.fr>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Inline declaration of minimally inserted implicit arguments
- Date: Tue, 13 Dec 2016 11:14:52 +0100
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=mail AT maximedenes.fr; spf=Pass smtp.mailfrom=mail AT maximedenes.fr; spf=None smtp.helo=postmaster AT mo173.mail-out.ovh.net
- Ironport-phdr: 9a23:E1H5chXyXAz3I7Mdz1He/oA5buvV8LGtZVwlr6E/grcLSJyIuqrYYxeGt8tkgFKBZ4jH8fUM07OQ6PG7HzJcqs7c+Fk5M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aFRrwLxd6KfroEYDOkcu3y/qy+5rOaAlUmTaxe71/IRG4oAnLt8QbjoRuJroxxxDUvnZGZuNayH9yK1mOhRj8/MCw/JBi8yRUpf0s8tNLXLv5caolU7FWFSwqPG8p6sLlsxnDVhaP6WAHUmoKiBpIAhPK4w/8U5zsryb1rOt92C2dPc3rUbA5XCmp4ql3RBP0jioMKjg0+3zVhMNtlqJWuA+vqQJxw4DUY4+bOvRxcazfctwGSmRMRdpRWi9bD4+gc4cCAegMMOBFpIf9vVsOqh6+CBGrCuz1xT5Ih3r20rMn2OovCwbG2hUnH8kTu3nTqdX6LqYSUeSuwanN1zrCYPJW2TLj54fVbB8hp++DXalqfcrf00kiDgXIhUiTp4z9Jz6Zy+YAvmuB4+duS+6jkXArpx9yrzS128shiIfEipoWx13K7yl13YY4KNOiREN0fdKoCoZcuz+bOoZwX8gsWXtnuDwgxb0DoZO7fDYFyJAgxxPHbvyHdJWE7xDtWeqLJDd3nnNleLamixa17Eig1vfwVs6q0FZKtCZFlMfDtmwV2xzS7MiIVOd981+81TuN1A3f8O9JLV4umabFNZIswaQ8mocRvEnNBiP2nV/5jK6SdkUq4Oio7OHnb63jppCGNo90jhrzMqE0lc2wAOQ4NxYBUHWF9uS6yrLj5lf1QLtQjvEuiKnWrIjaJdgHpq6+GwJazoEj6w+mAzi61NQYgGIIIUleeBOHiojpI0vBLOr5Dfe5mVSskS1ky+rIPr37Ud3xKS3Il66kdrJg4WZdzhAyxJZR/cF6ELYEddf6Sk70uZT0jxm5KETgxu/mDP1435MfXG+DD6mUK+XcqwnbtaoUP+CQadpN637GIP8/6qu2gA==
Yes, but I guess this is not what Ralf is asking for. He's asking if
there is a way to manually annotate some arguments to make them implicit
but not maximally implicit. "Set Implicit Arguments" makes Coq infer
such annotations, not always in the desired way.
To my knowledge, there is no way of doing it, apart from using
Arguments, as Ralf mentions. I don't know why we have the {A : Type}
syntax but not [A : Type] in binders, whereas Arguments has both. Maybe
historical reasons (v7 binders syntax).
There might exist an option that I'm not aware of, though. If not, a
pull request extending the binder syntax would be welcome :) Or even a
CEP, to see if people expect any problem with such an extension.
Maxime.
On 12/13/16 11:05, Théo Zimmermann wrote:
> I may very well have misunderstood your question but isn't Set Implicit
> Arguments what you are looking for?
>
> Set Implicit Arguments.
>
> Definition foo_id (A : Type) (a : A) := a.
>
> Print foo_id.
> (*
> foo_id =
> fun (A : Type) (a : A) => a
> : forall A : Type, A -> A
>
> Argument A is implicit
> Argument scopes are [type_scope _]
> *)
>
> A is implicit but not maximally inserted.
>
> Théo
>
> Le mar. 13 déc. 2016 à 10:58, Ralf Jung
> <jung AT mpi-sws.org
> <mailto:jung AT mpi-sws.org>>
> a écrit :
>
> Hi all,
>
> is there a syntax to make an argument of a Definition *minimally*
> inserted? I know the following syntax:
>
> Definition foo_id {A : Type} (a : A) := a.
>
> However, this makes A *maximally* inserted. Of course I can then use
> Arguments to make it minimally inserted, but (a) this has the potential
> of de-syncing with the definition and (b) the place where I need this is
> a section variable where I would have to re-declare Arguments for each
> definition inside the section. That's not a scalable option.
>
> What I am looking for is either an option ("Set ...") to configure
> whether the curly braces make arguments minimally or maximally implicit,
> or another syntax (an alternative to the curly braces) that makes them
> minimally implicit. Does something like that exist?
>
> I found "Unset Maximal Implicit Insertion.", but that affects only the
> arguments that are automatically made implicit, not those that are
> declared implicit by using curly braces.
>
> Kind regards,
> Ralf
>
- [Coq-Club] Inline declaration of minimally inserted implicit arguments, Ralf Jung, 12/13/2016
- Re: [Coq-Club] Inline declaration of minimally inserted implicit arguments, Théo Zimmermann, 12/13/2016
- Re: [Coq-Club] Inline declaration of minimally inserted implicit arguments, Ralf Jung, 12/13/2016
- Re: [Coq-Club] Inline declaration of minimally inserted implicit arguments, Maxime Dénès, 12/13/2016
- Re: [Coq-Club] Inline declaration of minimally inserted implicit arguments, Théo Zimmermann, 12/13/2016
Archive powered by MHonArc 2.6.18.