Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions doc/changelog/11-corelib/19117-good-defaults-Added.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- **Added:**
A GoodDefaults_2025 module setting various options to their recommended value,
see :ref:`the doc <good_defaults>` for more details
(`#19117 <https://github.com/rocq-prover/rocq/pull/19117>`_,
by Théo Zimmermann and Théo Winterhalter).
2 changes: 2 additions & 0 deletions doc/corelib/index-list.html.template
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,15 @@ through the <tt>Require Import</tt> command.</p>

<dt id="Compat"> <a href="#Compat"><b>Compat</b></a>:
Compatibility wrappers for previous versions of Coq
and recommended options at the time of a given Rocq release
</dt>
<dd>
theories/Corelib/Compat/Coq818.v
theories/Corelib/Compat/Coq819.v
theories/Corelib/Compat/Coq820.v
theories/Corelib/Compat/Rocq90.v
theories/Corelib/Compat/Rocq91.v
theories/Corelib/Compat/GoodDefaults_2025.v
theories/Ltac2/Compat/Coq818.v
theories/Ltac2/Compat/Coq819.v
</dd>
Expand Down
14 changes: 14 additions & 0 deletions doc/sphinx/language/core/basic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,20 @@ The :term:`flag`, :term:`option` and :term:`table`
mechanisms are used to modify the behavior of Rocq more globally in a
document or project.

.. _good_defaults:

The default value of some settings is not the one that would be recommended
today for compatibility reasons. We provide a *good default* file in the Corelib
which can be imported as follows:

.. rocqtop:: in

From Corelib Require Import GoodDefaults_2025.

This file is versioned to account for the changes in recommendations as the Rocq
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you expect these recommendations will over time become the default settings? If changes in the defaults are manageable for users, maybe that would be simpler.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great, but it is much more work, as it can break things on the user side. For now it's what we recommend for new users / files.

practice evolves. The 2025 edition will remain available without change after
future versions are released.

.. _attributes:

Attributes
Expand Down
42 changes: 42 additions & 0 deletions theories/Corelib/Compat/GoodDefaults_2025.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
(************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
(* v * Copyright INRIA, CNRS and contributors *)
(* <O___,, * (see version control and CREDITS file for authors & dates) *)
(* \VV/ **************************************************************)
(* // * This file is distributed under the terms of the *)
(* * GNU Lesser General Public License Version 2.1 *)
(* * (see LICENSE file for the text of the license) *)
(************************************************************************)

(** * Good defaults 2025

File exporting recommended option settings at the time of releasing Rocq v9.1

*)

#[ export ] Set Default Goal Selector "!".

#[ export ] Set Asymmetric Patterns.

#[ export ] Set Keyed Unification.

(** The following affect people using [Universe Polymorphism]. *)

#[ export ] Set Polymorphic Inductive Cumulativity.

#[ export ] Set Typeclasses Default Mode "!".
Hint Constants Opaque : typeclass_instances.

Ltac Tauto.intuition_solver ::= auto with core.

(** Makes the behavior of [injection] consistent with the rest of standard
tactics.
*)

#[ export ] Set Structural Injection.

(** These three affect pepole that set [Implicit Arguments]. *)

#[ export ] Set Strongly Strict Implicit.
#[ export ] Set Maximal Implicit Insertion.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anton-trunov seemed to defend the current default in his answer on Stack Overflow back in 2016: https://stackoverflow.com/questions/37211899/purpose-of-maximal-vs-non-maximal-implicit-arguments

That being said, I don't think the issue of having to add @ when you want to refer to a non-partially-applied constant is such a pain.

And on the other hand, the same @anton-trunov supported in 2021 the switch to maximally implicit arguments for lists (which didn't land) in #13069.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, 2016 is old

#[ export ] Set Contextual Implicit.
Loading