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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The library has been tested using Agda 2.8.0.
Highlights
----------

* Modules that previously used `--cubical-compatible` once again use `--without-K`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I admire the understatement, but I think that this is (probably) why I'd rather have this as a v3.0 change... and be documented/announced/released as such.

While I agree with @JacquesCarette 's arguments on #2792 that this was a change we should not have made for v2.x, now that we have, I'd be happier if the v2.x line of stdlib were the cubical-compatible releases, but with our overall strategy for v3.0 to make clean breaks with all kinds of legacy, this one included, that we start the v3.y line with the reversion enacted here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Philosophically, this makes sense.

Pragmatically, I'm afraid that v3.0 might take quite a lot of time, and so we would be waiting for the benefits quite a while. I guess if we planned to have v3.0.1, v3.0.2, v3.0.3, in quick succession, all of them being breaking before eventually stabilizing, I'd be happy with that.

But I don't want to wait a full year or more to have a released version of stdlib in its current state.

Copy link
Copy Markdown
Collaborator

@jamesmckinna jamesmckinna Mar 25, 2026

Choose a reason for hiding this comment

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

@JacquesCarette I absolutely agree. It's already a year (or more!) since we decided to delay v3.0 in favour of v2.4. But I maybe hoped that we could tie off v2.4 soon ('for a suitable definition of soon'), rather than wait yet another year. Maybe some of @MatthewDaggitt 's more cautious/conservative approach to these things has rubbed off on me!


Bug-fixes
---------

Expand Down
10 changes: 5 additions & 5 deletions GenerateEverything.hs
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@ classify fp hd ls
-- We start with sanity checks
| isUnsafe && safe = throwError $ fp ++ contradiction "unsafe" "safe"
| not (isUnsafe || safe) = throwError $ fp ++ uncategorized "unsafe" "safe"
| isWithK && cubicalC = throwError $ fp ++ contradiction "as relying on K" "cubical-compatible"
| isWithK && withoutK = throwError $ fp ++ contradiction "as relying on K" "without-K"
| isWithK && not withK = throwError $ fp ++ missingWithK
| not (isWithK || cubicalC) = throwError $ fp ++ uncategorized "as relying on K" "cubical-compatible"
| not (isWithK || withoutK) = throwError $ fp ++ uncategorized "as relying on K" "without-K"
-- And then perform the actual classification
| otherwise = do
let safety = if | safe -> Safe
Expand All @@ -273,9 +273,9 @@ classify fp hd ls
isUnsafe = isUnsafeModule fp

-- based on detected OPTIONS
safe = option "--safe"
withK = option "--with-K"
cubicalC = option "--cubical-compatible"
safe = option "--safe"
withK = option "--with-K"
withoutK = option "--without-K"

-- based on detected comment in header
deprecated = let detect = List.isSubsequenceOf "This module is DEPRECATED."
Expand Down
6 changes: 3 additions & 3 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ What is an acceptable contribution?
for purely computational contributions this will involve adding tests.

- It should use the minimal set of Agda features, i.e. it should normally use
the Agda option pragmas `--cubical-compatible` and `--safe`, with the occasional use of
the Agda option pragmas `--without-K` and `--safe`, with the occasional use of
`--with-K`, `--sized`, `--guardedness` in certain situations.

In general, if something is in a general undergraduate Computer Science or Mathematics
Expand Down Expand Up @@ -150,11 +150,11 @@ proper header, and a brief description of what the module is for, e.g.
```

If possible, each module should use the options `--safe` and
`--cubical-compatible`. You can achieve this by placing the following
`--without-K`. You can achieve this by placing the following
pragma under the header and before any other line of code (including
the module name):
```
{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}
```

If a module cannot be made safe or needs the `--with-K` option then it should be
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ Most of the library can be type-checked using the `--safe` flag. Please consult
[GenerateEverything.hs](https://github.com/agda/agda-stdlib/blob/master/GenerateEverything.hs#L32-L82)
for a full list of modules that use unsafe features.

#### The `--cubical-compatible` flag
#### The `--without-K` flag

Most of the library can be type-checked using the `--cubical-compatible` flag, which since Agda v2.6.3 supersedes the former `--without-K` flag. Please consult
Most of the library can be type-checked using the `--without-K` flag. Please consult
[GenerateEverything.hs](https://github.com/agda/agda-stdlib/blob/master/GenerateEverything.hs#L91-L111)
for a full list of modules that use axiom K, requiring the `--with-K` flag.

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Case.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- pattern-matching lambda abstractions
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module README.Case where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Data/Container/FreeMonad.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- used
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --sized-types #-}
{-# OPTIONS --without-K --sized-types #-}

module README.Data.Container.FreeMonad where

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Example of multi-sorted algebras as indexed containers
------------------------------------------------------------------------

{-# OPTIONS --safe --cubical-compatible #-}
{-# OPTIONS --safe --without-K #-}

module README.Data.Container.Indexed.MultiSortedAlgebraExample where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Data/Default.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- argument that default to a specified value if none is passed.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module README.Data.Default where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Data/Fin/Relation/Unary/Top.agda
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
-- together with their corresponding properties in `Data.Fin.Properties`.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module README.Data.Fin.Relation.Unary.Top where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Data/Fin/Substitution/UntypedLambda.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- of substitution for the untyped λ-calculus, along with some lemmas
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module README.Data.Fin.Substitution.UntypedLambda where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Data/Integer.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- operations and properties are defined, and how they can be used
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible #-}
{-# OPTIONS --without-K #-}

module README.Data.Integer where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Data/List/Relation/Ternary/Interleaving.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Examples showing how the notion of Interleaving can be used
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module README.Data.List.Relation.Ternary.Interleaving where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Data/Nat.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- operations and properties are defined, and how they can be used
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible #-}
{-# OPTIONS --without-K #-}

module README.Data.Nat where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Data/Rational.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- operations and properties are defined, and how they can be used
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible #-}
{-# OPTIONS --without-K #-}

module README.Data.Rational where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Data/Tree/AVL.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Some examples showing how the AVL tree module can be used
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module README.Data.Tree.AVL where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Data/Tree/Binary.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Some examples showing how the Binary tree module can be used
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --sized-types #-}
{-# OPTIONS --without-K --sized-types #-}

module README.Data.Tree.Binary where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Data/Tree/Rose.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Some examples showing how the Rose tree module can be used
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --sized-types #-}
{-# OPTIONS --without-K --sized-types #-}

module README.Data.Tree.Rose where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Data/Trie/NonDependent.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Example use case for a trie: a wee generic lexer
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --sized-types #-}
{-# OPTIONS --without-K --sized-types #-}

module README.Data.Trie.NonDependent where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Data/Vec/Relation/Binary/Equality/Cast.agda
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
-- section.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module README.Data.Vec.Relation.Binary.Equality.Cast where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Data/Wrap.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- An example of how to use `Wrap` to help term inference.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module README.Data.Wrap where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Debug/Trace.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- An example showing how the Debug.Trace module can be used
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --rewriting --guardedness #-}
{-# OPTIONS --without-K --rewriting --guardedness #-}

module README.Debug.Trace where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Design/Decidability.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Examples of decision procedures and how to use them
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module README.Design.Decidability where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Design/Fixity.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Documentation describing some of the fixity choices
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

-- There is no actual code in here, just design note.

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Effect/Monad/Partiality.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Example showing the use of the partiality Monad
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe --guardedness #-}
{-# OPTIONS --without-K --safe --guardedness #-}

module README.Effect.Monad.Partiality where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Inspect.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- it is implemented in the standard library.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module README.Inspect where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Nary.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- can be used
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module README.Nary where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Reflection/External.agda
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
-- section on Reflection in the Agda user manual for more details.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --allow-exec #-}
{-# OPTIONS --without-K --allow-exec #-}

module README.Reflection.External where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Relation/Binary/TypeClasses.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Usage examples of typeclasses for binary relations
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module README.Relation.Binary.TypeClasses where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Tactic/Cong.agda
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module README.Tactic.Cong where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Text/Printf.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Examples of format strings and printf
------------------------------------------------------------------------

{-# OPTIONS --safe --cubical-compatible #-}
{-# OPTIONS --safe --without-K #-}

module README.Text.Printf where

Expand Down
2 changes: 1 addition & 1 deletion doc/README/Text/Tabular.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Examples of printing list and vec-based tables
------------------------------------------------------------------------

{-# OPTIONS --safe --cubical-compatible #-}
{-# OPTIONS --safe --without-K #-}

module README.Text.Tabular where

Expand Down
2 changes: 1 addition & 1 deletion src/Algebra.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- (packed in records together with sets, operations, etc.)
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module Algebra where

Expand Down
2 changes: 1 addition & 1 deletion src/Algebra/Apartness.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Algebraic objects with an apartness relation
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module Algebra.Apartness where

Expand Down
2 changes: 1 addition & 1 deletion src/Algebra/Apartness/Bundles.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Bundles for local algebraic structures
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module Algebra.Apartness.Bundles where

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Properties of Heyting Commutative Rings
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

open import Algebra.Apartness.Bundles using (HeytingCommutativeRing)

Expand Down
2 changes: 1 addition & 1 deletion src/Algebra/Apartness/Structures.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Algebraic structures with an apartness relation
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

open import Algebra.Core using (Op₁; Op₂)
open import Relation.Binary.Core using (Rel)
Expand Down
2 changes: 1 addition & 1 deletion src/Algebra/Bundles.agda
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

-- The contents of this module should be accessed via `Algebra`.

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module Algebra.Bundles where

Expand Down
2 changes: 1 addition & 1 deletion src/Algebra/Bundles/Raw.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Definitions of 'raw' bundles
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module Algebra.Bundles.Raw where

Expand Down
2 changes: 1 addition & 1 deletion src/Algebra/Consequences/Base.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- commutativity) that don't require the equality relation to be a setoid.
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module Algebra.Consequences.Base
{a} {A : Set a} where
Expand Down
2 changes: 1 addition & 1 deletion src/Algebra/Consequences/Propositional.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- commutativity (specialised to propositional equality)
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

module Algebra.Consequences.Propositional
{a} {A : Set a} where
Expand Down
2 changes: 1 addition & 1 deletion src/Algebra/Consequences/Setoid.agda
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- commutativity, when the underlying relation is a setoid
------------------------------------------------------------------------

{-# OPTIONS --cubical-compatible --safe #-}
{-# OPTIONS --without-K --safe #-}

open import Relation.Binary.Bundles using (Setoid)
open import Relation.Binary.Definitions
Expand Down
Loading
Loading