| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Showing unnormalised rational numbers |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
module Data.Rational.Unnormalised.Show where |
| 10 |
|
| 11 |
import Data.Integer.Show as ℤ using (show) |
| 12 |
open import Data.Rational.Unnormalised.Base using (ℚᵘ; ↥_; ↧_) |
| 13 |
open import Data.String.Base using (String; _++_) |
| 14 |
|
| 15 |
show : ℚᵘ → String |
| 16 |
show p = ℤ.show (↥ p) ++ "/" ++ ℤ.show (↧ p) |