Skip to content

Commit 7602ca3

Browse files
Stage 2 of refactoring of Relation.Nullary (#1869)
* Deprecate Relation.Nullary.(Sum/Product/Implication) * Some grepped refining of imports * Added missing deprecation warnings
1 parent 51a138b commit 7602ca3

File tree

142 files changed

+305
-355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+305
-355
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,16 @@ Non-backwards compatible changes
534534
535535
* Backwards compatibility has been maintained, as `Relation.Nullary` still re-exports these publicly.
536536
537+
* The modules:
538+
```
539+
Relation.Nullary.Product
540+
Relation.Nullary.Sum
541+
Relation.Nullary.Implication
542+
```
543+
have been deprecated and their contents moved to `Relation.Nullary.(Negation/Reflects/Decidable)`
544+
however all their contents is re-exported by `Relation.Nullary` which is the easiest way to access
545+
it now.
546+
537547
* In order to facilitate this reorganisation the following breaking moves have occured:
538548
- `¬?` has been moved from `Relation.Nullary.Negation.Core` to `Relation.Nullary.Decidable.Core`
539549
- `¬-reflects` has been moved from `Relation.Nullary.Negation.Core` to `Relation.Nullary.Reflects`.

README/Axiom.agda

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private variable ℓ : Level
3131
-- The types for which `P` or `¬P` holds is called `Dec P` in the
3232
-- standard library (short for `Decidable`).
3333

34-
open import Relation.Nullary using (Dec)
34+
open import Relation.Nullary.Decidable using (Dec)
3535

3636
-- The type of the proof of saying that excluded middle holds for
3737
-- all types at universe level ℓ is therefore:

README/Data/List/Relation/Binary/Pointwise.agda

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ open import Data.Nat using (ℕ; _<_; s≤s; z≤n)
1010
open import Data.List using (List; []; _∷_; length)
1111
open import Relation.Binary.PropositionalEquality
1212
using (_≡_; refl; sym; cong; setoid)
13-
open import Relation.Nullary using (¬_)
13+
open import Relation.Nullary.Negation using (¬_)
1414

1515
------------------------------------------------------------------------
1616
-- Pointwise

README/Design/Decidability.agda

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@
88

99
module README.Design.Decidability where
1010

11-
-- Reflects and Dec are defined in Relation.Nullary, and operations on them can
12-
-- be found in Relation.Nullary.Reflects and Relation.Nullary.Decidable.
13-
14-
open import Relation.Nullary as Nullary
15-
open import Relation.Nullary.Reflects
16-
open import Relation.Nullary.Decidable
17-
1811
open import Data.Bool
1912
open import Data.List
2013
open import Data.List.Properties using (∷-injective)
@@ -25,7 +18,11 @@ open import Data.Unit
2518
open import Function
2619
open import Relation.Binary.PropositionalEquality
2720
open import Relation.Nary
28-
open import Relation.Nullary.Product
21+
22+
------------------------------------------------------------------------
23+
-- Reflects
24+
25+
open import Relation.Nullary.Reflects
2926

3027
infix 4 _≟₀_ _≟₁_ _≟₂_
3128

@@ -43,6 +40,11 @@ ex₂ : (b : Bool) → Reflects (T b) b
4340
ex₂ false = ofⁿ id
4441
ex₂ true = ofʸ tt
4542

43+
------------------------------------------------------------------------
44+
-- Dec
45+
46+
open import Relation.Nullary.Decidable
47+
4648
-- A proof of `Dec P` is a proof of `Reflects P b` for some `b`.
4749
-- `Dec P` is declared as a record, with fields:
4850
-- does : Bool

README/Text/Regex.agda

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ open import Data.Bool using (true; false)
1212
open import Data.List using (_∷_; [])
1313
open import Data.String
1414
open import Function.Base using () renaming (_$′_ to _$_)
15-
open import Relation.Nullary using (yes)
15+
open import Relation.Nullary.Decidable using (yes)
1616
open import Relation.Nullary.Decidable using (True; False; from-yes)
1717

1818
-- Our library available via the Text.Regex module is safe but it works on

src/Algebra/Apartness/Structures.agda

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ open import Algebra.Definitions _≈_ using (Invertible)
2222
open import Algebra.Structures _≈_ using (IsCommutativeRing)
2323
open import Relation.Binary.Structures using (IsEquivalence; IsApartnessRelation)
2424
open import Relation.Binary.Definitions using (Tight)
25-
open import Relation.Nullary using (¬_)
25+
open import Relation.Nullary.Negation using (¬_)
2626
import Relation.Binary.Properties.ApartnessRelation as AR
2727

2828

src/Algebra/Bundles/Raw.agda

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module Algebra.Bundles.Raw where
1111
open import Algebra.Core
1212
open import Relation.Binary.Core using (Rel)
1313
open import Level using (suc; _⊔_)
14-
open import Relation.Nullary using (¬_)
14+
open import Relation.Nullary.Negation using (¬_)
1515

1616
------------------------------------------------------------------------
1717
-- Raw bundles with 1 binary operation

src/Algebra/Construct/LexProduct/Base.agda

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ open import Data.Bool.Base using (true; false)
1111
open import Data.Product using (_×_; _,_)
1212
open import Relation.Binary.Core using (Rel)
1313
open import Relation.Binary.Definitions using (Decidable)
14-
open import Relation.Nullary using (does; yes; no)
14+
open import Relation.Nullary.Decidable using (does; yes; no)
1515

1616
module Algebra.Construct.LexProduct.Base
1717
{a b ℓ} {A : Set a} {B : Set b}

src/Algebra/Construct/LexProduct/Inner.agda

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ open import Data.Product using (_×_; _,_; swap; map; uncurry′)
1212
open import Function.Base using (_∘_)
1313
open import Level using (Level; _⊔_)
1414
open import Relation.Binary.Definitions using (Decidable)
15-
open import Relation.Nullary using (does; yes; no)
15+
open import Relation.Nullary.Decidable using (does; yes; no)
1616
open import Relation.Nullary.Negation
1717
using (contradiction; contradiction₂)
1818
import Relation.Binary.Reasoning.Setoid as SetoidReasoning

src/Algebra/Definitions.agda

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{-# OPTIONS --without-K --safe #-}
1717

1818
open import Relation.Binary.Core
19-
open import Relation.Nullary using (¬_)
19+
open import Relation.Nullary.Negation using (¬_)
2020

2121
module Algebra.Definitions
2222
{a ℓ} {A : Set a} -- The underlying set

0 commit comments

Comments
 (0)