Skip to content

Stop Data.Rational.Base exporting +0 and +[1+_] #1537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 10, 2021
Merged
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ Non-backwards compatible changes
So `[a-zA-Z]+.agdai?` run on "the path _build/Main.agdai corresponds to"
will return "Main.agdai" when it used to be happy to just return "n.agda".

* The constructors `+0` and `+[1+_]` from `Data.Integer.Base` are no longer
exported by `Data.Rational.Base`. You will have to open `Data.Integer(.Base)`
directly to use them.

Deprecated modules
------------------

Expand Down
9 changes: 1 addition & 8 deletions src/Data/Rational/Base.agda
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Data.Rational.Base where

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

open ≡-Reasoning

-- Note, these are re-exported publicly to maintain backwards
-- compatability. Although we are unable (?) to put a warning on them,
-- using these from `Data.Rational` should be viewed as a deprecated
-- feature.

open import Data.Integer public using (+0; +[1+_])

------------------------------------------------------------------------
-- Rational numbers in reduced form. Note that there is exactly one
-- way to represent every rational number.
Expand Down
2 changes: 1 addition & 1 deletion src/Data/Rational/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import Algebra.Morphism.RingMonomorphism as RingMonomorphisms
import Algebra.Morphism.LatticeMonomorphism as LatticeMonomorphisms
import Algebra.Properties.CommutativeSemigroup as CommSemigroupProperties
open import Data.Bool.Base using (T; true; false)
open import Data.Integer.Base as ℤ using (ℤ; +_; -[1+_]; 0ℤ; 1ℤ; _◃_)
open import Data.Integer.Base as ℤ using (ℤ; +_; -[1+_]; +[1+_]; +0; 0ℤ; 1ℤ; _◃_)
open import Data.Integer.Coprimality using (coprime-divisor)
import Data.Integer.Properties as ℤ
open import Data.Integer.GCD using (gcd; gcd[i,j]≡0⇒i≡0; gcd[i,j]≡0⇒j≡0)
Expand Down