Skip to content

Commit b09525c

Browse files
Stop Data.Rational.Base exporting +0 and +[1+_] (#1537)
1 parent b47bcde commit b09525c

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ Non-backwards compatible changes
5353
So `[a-zA-Z]+.agdai?` run on "the path _build/Main.agdai corresponds to"
5454
will return "Main.agdai" when it used to be happy to just return "n.agda".
5555

56+
* The constructors `+0` and `+[1+_]` from `Data.Integer.Base` are no longer
57+
exported by `Data.Rational.Base`. You will have to open `Data.Integer(.Base)`
58+
directly to use them.
59+
5660
Deprecated modules
5761
------------------
5862

src/Data/Rational/Base.agda

+1-8
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module Data.Rational.Base where
1010

1111
open import Data.Bool.Base using (Bool; true; false; if_then_else_)
1212
open import Function.Base using (id)
13-
open import Data.Integer.Base as ℤ using (ℤ; +_; +0; -[1+_])
13+
open import Data.Integer.Base as ℤ using (ℤ; +_; +0; +[1+_]; -[1+_])
1414
import Data.Integer.GCD as ℤ
1515
import Data.Integer.DivMod as ℤ
1616
open import Data.Nat.GCD
@@ -35,13 +35,6 @@ open import Relation.Binary.PropositionalEquality
3535

3636
open ≡-Reasoning
3737

38-
-- Note, these are re-exported publicly to maintain backwards
39-
-- compatability. Although we are unable (?) to put a warning on them,
40-
-- using these from `Data.Rational` should be viewed as a deprecated
41-
-- feature.
42-
43-
open import Data.Integer public using (+0; +[1+_])
44-
4538
------------------------------------------------------------------------
4639
-- Rational numbers in reduced form. Note that there is exactly one
4740
-- way to represent every rational number.

src/Data/Rational/Properties.agda

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Algebra.Morphism.RingMonomorphism as RingMonomorphisms
2020
import Algebra.Morphism.LatticeMonomorphism as LatticeMonomorphisms
2121
import Algebra.Properties.CommutativeSemigroup as CommSemigroupProperties
2222
open import Data.Bool.Base using (T; true; false)
23-
open import Data.Integer.Base as ℤ using (ℤ; +_; -[1+_]; 0ℤ; 1ℤ; _◃_)
23+
open import Data.Integer.Base as ℤ using (ℤ; +_; -[1+_]; +[1+_]; +0; 0ℤ; 1ℤ; _◃_)
2424
open import Data.Integer.Coprimality using (coprime-divisor)
2525
import Data.Integer.Properties as ℤ
2626
open import Data.Integer.GCD using (gcd; gcd[i,j]≡0⇒i≡0; gcd[i,j]≡0⇒j≡0)

0 commit comments

Comments
 (0)