| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Rational numbers |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
module Data.Rational where |
| 10 |
|
| 11 |
------------------------------------------------------------------------ |
| 12 |
-- Publicly re-export contents of core module and queries |
| 13 |
|
| 14 |
open import Data.Rational.Base public |
| 15 |
open import Data.Rational.Properties public |
| 16 |
using (_≟_; _≤?_; _<?_; _≥?_; _>?_) |
| 17 |
|
| 18 |
------------------------------------------------------------------------ |
| 19 |
-- Deprecated |
| 20 |
|
| 21 |
-- Version 1.0 |
| 22 |
|
| 23 |
open import Data.Rational.Properties public |
| 24 |
using (drop-*≤*; ≃⇒≡; ≡⇒≃) |
| 25 |
|
| 26 |
-- Version 1.5 |
| 27 |
|
| 28 |
import Data.Integer.Show as ℤ |
| 29 |
open import Data.String.Base using (String; _++_) |
| 30 |
|
| 31 |
show : ℚ → String |
| 32 |
show p = ℤ.show (↥ p) ++ "/" ++ ℤ.show (↧ p) |
| 33 |
|
| 34 |
{-# WARNING_ON_USAGE show |
| 35 |
"Warning: show was deprecated in v1.5. |
| 36 |
Please use Data.Rational.Show's show instead." |
| 37 |
#-} |