Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Inline declaration of minimally inserted implicit arguments

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Inline declaration of minimally inserted implicit arguments


Chronological Thread 
  • From: Théo Zimmermann <theo.zimmi AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Inline declaration of minimally inserted implicit arguments
  • Date: Tue, 13 Dec 2016 10:05:42 +0000
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=theo.zimmi AT gmail.com; spf=Pass smtp.mailfrom=theo.zimmi AT gmail.com; spf=None smtp.helo=postmaster AT mail-wm0-f54.google.com
  • Ironport-phdr: 9a23:ukBJGRyeZDAujR7XCy+O+j09IxM/srCxBDY+r6Qd0u0SIJqq85mqBkHD//Il1AaPBtSArawYwLKN++C4ACpbvsbH6ChDOLV3FDY7yuwu1zQ6B8CEDUCpZNXLVAcdWPp4aVl+4nugOlJUEsutL3fbo3m18CJAUk6nbVk9dazJHdvZiN3y3OSv8bXSZR9JjXyze+BcNhKz+DnRN84hs4pnL6srzxLPpDMcZ+RbwiV6JFeWnj7z486x+Nho9CEG6KFpzNJJTaivJ/dwdrdfFjlza20=

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> 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



Archive powered by MHonArc 2.6.18.

Top of Page