module UVMHS.Core.Data.Arithmetic where
import UVMHS.Core.Init
import UVMHS.Core.Classes
import UVMHS.Core.Data.Option ()
import qualified Prelude as HS
import qualified Data.Ratio as HS
zabs ∷ ℤ → ℕ
zabs :: ℤ -> ℕ
zabs = ℤ -> ℕ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (ℤ -> ℕ) -> (ℤ -> ℤ) -> ℤ -> ℕ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℤ -> ℤ
forall a. Num a => a -> a
HS.abs
qabs ∷ ℚ → ℚᴾ
qabs :: ℚ -> ℚᴾ
qabs = ℚ -> ℚᴾ
forall a. Fractional a => ℚ -> a
HS.fromRational (ℚ -> ℚᴾ) -> (ℚ -> ℚ) -> ℚ -> ℚᴾ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℚ -> ℚ
forall a. Num a => a -> a
HS.abs
numer ∷ ℚ → ℤ
numer :: ℚ -> ℤ
numer = ℚ -> ℤ
forall a. Ratio a -> a
HS.numerator
denom ∷ ℚ → ℕ
denom :: ℚ -> ℕ
denom = ℤ -> ℕ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (ℤ -> ℕ) -> (ℚ -> ℤ) -> ℚ -> ℕ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℚ -> ℤ
forall a. Ratio a -> a
HS.denominator
numerᴾ ∷ ℚᴾ → ℕ
numerᴾ :: ℚᴾ -> ℕ
numerᴾ = ℚᴾ -> ℕ
forall a. Ratio a -> a
HS.numerator
denomᴾ ∷ ℚᴾ → ℕ
denomᴾ :: ℚᴾ -> ℕ
denomᴾ = ℚᴾ -> ℕ
forall a. Ratio a -> a
HS.denominator
truncate ∷ 𝔻 → ℤ
truncate :: 𝔻 -> ℤ
truncate = 𝔻 -> ℤ
forall b. Integral b => 𝔻 -> b
forall a b. (RealFrac a, Integral b) => a -> b
HS.truncate
ceiling ∷ 𝔻 → ℤ
ceiling :: 𝔻 -> ℤ
ceiling = 𝔻 -> ℤ
forall b. Integral b => 𝔻 -> b
forall a b. (RealFrac a, Integral b) => a -> b
HS.ceiling
floor ∷ 𝔻 → ℤ
floor :: 𝔻 -> ℤ
floor = 𝔻 -> ℤ
forall b. Integral b => 𝔻 -> b
forall a b. (RealFrac a, Integral b) => a -> b
HS.floor
truncateᴾ ∷ 𝔻ᴾ → ℕ
truncateᴾ :: 𝔻ᴾ -> ℕ
truncateᴾ = 𝔻 -> ℕ
forall b. Integral b => 𝔻 -> b
forall a b. (RealFrac a, Integral b) => a -> b
HS.truncate (𝔻 -> ℕ) -> (𝔻ᴾ -> 𝔻) -> 𝔻ᴾ -> ℕ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ 𝔻ᴾ -> 𝔻
un𝔻ᴾ
ceilingᴾ ∷ 𝔻ᴾ → ℕ
ceilingᴾ :: 𝔻ᴾ -> ℕ
ceilingᴾ = 𝔻 -> ℕ
forall b. Integral b => 𝔻 -> b
forall a b. (RealFrac a, Integral b) => a -> b
HS.ceiling (𝔻 -> ℕ) -> (𝔻ᴾ -> 𝔻) -> 𝔻ᴾ -> ℕ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ 𝔻ᴾ -> 𝔻
un𝔻ᴾ
floorᴾ ∷ 𝔻ᴾ → ℕ
floorᴾ :: 𝔻ᴾ -> ℕ
floorᴾ = 𝔻 -> ℕ
forall b. Integral b => 𝔻 -> b
forall a b. (RealFrac a, Integral b) => a -> b
HS.floor (𝔻 -> ℕ) -> (𝔻ᴾ -> 𝔻) -> 𝔻ᴾ -> ℕ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ 𝔻ᴾ -> 𝔻
un𝔻ᴾ
instance Zero ℕ where zero :: ℕ
zero = ℕ
0
instance Plus ℕ where + :: ℕ -> ℕ -> ℕ
(+) = ℕ -> ℕ -> ℕ
forall a. Num a => a -> a -> a
(HS.+)
instance Minus ℕ where (-) = ℕ -> ℕ -> ℕ
forall a. Num a => a -> a -> a
(HS.-)
instance One ℕ where one :: ℕ
one = ℕ
1
instance Times ℕ where × :: ℕ -> ℕ -> ℕ
(×) = ℕ -> ℕ -> ℕ
forall a. Num a => a -> a -> a
(HS.*)
instance DivMod ℕ where ⌿ :: ℕ -> ℕ -> ℕ
(⌿) = ℕ -> ℕ -> ℕ
forall a. Integral a => a -> a -> a
HS.div ; ÷ :: ℕ -> ℕ -> ℕ
(÷) = ℕ -> ℕ -> ℕ
forall a. Integral a => a -> a -> a
HS.mod
instance Pon ℕ where ^^ :: ℕ -> ℕ -> ℕ
(^^) = ℕ -> ℕ -> ℕ
forall a b. (Num a, Integral b) => a -> b -> a
(HS.^)
instance Pow ℕ where ^ :: ℕ -> ℕ -> ℕ
(^) = ℕ -> ℕ -> ℕ
forall a b. (Num a, Integral b) => a -> b -> a
(HS.^)
instance Bot ℕ where bot :: ℕ
bot = ℕ
0
instance Join ℕ where ⊔ :: ℕ -> ℕ -> ℕ
(⊔) = ℕ -> ℕ -> ℕ
forall a. Ord a => a -> a -> a
(⩏)
instance Meet ℕ where ⊓ :: ℕ -> ℕ -> ℕ
(⊓) = ℕ -> ℕ -> ℕ
forall a. Ord a => a -> a -> a
(⩎)
instance Null ℕ where null :: ℕ
null = ℕ
0
instance Append ℕ where ⧺ :: ℕ -> ℕ -> ℕ
(⧺) = ℕ -> ℕ -> ℕ
forall a. Plus a => a -> a -> a
(+)
instance Additive ℕ
instance Multiplicative ℕ
instance JoinLattice ℕ
instance Monoid ℕ
instance ToNat ℕ where nat :: ℕ -> ℕ
nat = ℕ -> ℕ
forall a. a -> a
id
instance ToNatO64 ℕ where
natO64 :: ℕ -> 𝑂 ℕ64
natO64 ℕ
n
| ℕ
n ℕ -> ℕ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ64 -> ℕ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ64) = 𝑂 ℕ64
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ64 -> 𝑂 ℕ64
forall a. a -> 𝑂 a
Some (ℕ64 -> 𝑂 ℕ64) -> ℕ64 -> 𝑂 ℕ64
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ
n
instance ToNatO32 ℕ where
natO32 :: ℕ -> 𝑂 ℕ32
natO32 ℕ
n
| ℕ
n ℕ -> ℕ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ32 -> ℕ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ32) = 𝑂 ℕ32
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ32 -> 𝑂 ℕ32
forall a. a -> 𝑂 a
Some (ℕ32 -> 𝑂 ℕ32) -> ℕ32 -> 𝑂 ℕ32
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ
n
instance ToNatO16 ℕ where
natO16 :: ℕ -> 𝑂 ℕ16
natO16 ℕ
n
| ℕ
n ℕ -> ℕ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ16 -> ℕ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ16) = 𝑂 ℕ16
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ16 -> 𝑂 ℕ16
forall a. a -> 𝑂 a
Some (ℕ16 -> 𝑂 ℕ16) -> ℕ16 -> 𝑂 ℕ16
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ
n
instance ToNatO8 ℕ where
natO8 :: ℕ -> 𝑂 ℕ8
natO8 ℕ
n
| ℕ
n ℕ -> ℕ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ8 -> ℕ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ8) = 𝑂 ℕ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ8 -> 𝑂 ℕ8
forall a. a -> 𝑂 a
Some (ℕ8 -> 𝑂 ℕ8) -> ℕ8 -> 𝑂 ℕ8
forall a b. (a -> b) -> a -> b
$ ℕ -> ℕ8
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ
n
instance ToInt ℕ where int :: ℕ -> ℤ
int = ℕ -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToIntO64 ℕ where
intO64 :: ℕ -> 𝑂 ℤ64
intO64 ℕ
n
| ℕ
n ℕ -> ℕ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ64 -> ℕ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ64) = 𝑂 ℤ64
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ64 -> 𝑂 ℤ64
forall a. a -> 𝑂 a
Some (ℤ64 -> 𝑂 ℤ64) -> ℤ64 -> 𝑂 ℤ64
forall a b. (a -> b) -> a -> b
$ ℕ -> ℤ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ
n
instance ToIntO32 ℕ where
intO32 :: ℕ -> 𝑂 ℤ32
intO32 ℕ
n
| ℕ
n ℕ -> ℕ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ32 -> ℕ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ32) = 𝑂 ℤ32
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ32 -> 𝑂 ℤ32
forall a. a -> 𝑂 a
Some (ℤ32 -> 𝑂 ℤ32) -> ℤ32 -> 𝑂 ℤ32
forall a b. (a -> b) -> a -> b
$ ℕ -> ℤ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ
n
instance ToIntO16 ℕ where
intO16 :: ℕ -> 𝑂 ℤ16
intO16 ℕ
n
| ℕ
n ℕ -> ℕ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ16 -> ℕ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ16) = 𝑂 ℤ16
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ16 -> 𝑂 ℤ16
forall a. a -> 𝑂 a
Some (ℤ16 -> 𝑂 ℤ16) -> ℤ16 -> 𝑂 ℤ16
forall a b. (a -> b) -> a -> b
$ ℕ -> ℤ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ
n
instance ToIntO8 ℕ where
intO8 :: ℕ -> 𝑂 ℤ8
intO8 ℕ
n
| ℕ
n ℕ -> ℕ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ8 -> ℕ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ8) = 𝑂 ℤ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ8 -> 𝑂 ℤ8
forall a. a -> 𝑂 a
Some (ℤ8 -> 𝑂 ℤ8) -> ℤ8 -> 𝑂 ℤ8
forall a b. (a -> b) -> a -> b
$ ℕ -> ℤ8
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ
n
instance ToRational ℕ where rat :: ℕ -> ℚ
rat = ℕ -> ℚ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToRationalᴾ ℕ where ratᴾ :: ℕ -> ℚᴾ
ratᴾ = ℕ -> ℚᴾ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToDouble ℕ where dbl :: ℕ -> 𝔻
dbl = ℕ -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToDoubleᴾ ℕ where dblᴾ :: ℕ -> 𝔻ᴾ
dblᴾ = 𝔻 -> 𝔻ᴾ
𝔻ᴾ (𝔻 -> 𝔻ᴾ) -> (ℕ -> 𝔻) -> ℕ -> 𝔻ᴾ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℕ -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToNumber ℕ where num :: ℕ -> ℝ
num = ℤ -> ℝ
Integer (ℤ -> ℝ) -> (ℕ -> ℤ) -> ℕ -> ℝ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℕ -> ℤ
forall a. ToInt a => a -> ℤ
int
instance ToNumberᴾ ℕ where numᴾ :: ℕ -> ℝᴾ
numᴾ = ℕ -> ℝᴾ
Natural
instance Zero ℕ64 where zero :: ℕ64
zero = ℕ -> ℕ64
𝕟64 ℕ
0
instance Plus ℕ64 where + :: ℕ64 -> ℕ64 -> ℕ64
(+) = ℕ64 -> ℕ64 -> ℕ64
forall a. Num a => a -> a -> a
(HS.+)
instance Minus ℕ64 where (-) = ℕ64 -> ℕ64 -> ℕ64
forall a. Num a => a -> a -> a
(HS.-)
instance One ℕ64 where one :: ℕ64
one = ℕ -> ℕ64
𝕟64 ℕ
1
instance Times ℕ64 where × :: ℕ64 -> ℕ64 -> ℕ64
(×) = ℕ64 -> ℕ64 -> ℕ64
forall a. Num a => a -> a -> a
(HS.*)
instance DivMod ℕ64 where ⌿ :: ℕ64 -> ℕ64 -> ℕ64
(⌿) = ℕ64 -> ℕ64 -> ℕ64
forall a. Integral a => a -> a -> a
HS.div ; ÷ :: ℕ64 -> ℕ64 -> ℕ64
(÷) = ℕ64 -> ℕ64 -> ℕ64
forall a. Integral a => a -> a -> a
HS.mod
instance Pon ℕ64 where ^^ :: ℕ64 -> ℕ -> ℕ64
(^^) = ℕ64 -> ℕ -> ℕ64
forall a b. (Num a, Integral b) => a -> b -> a
(HS.^)
instance Pow ℕ64 where ^ :: ℕ64 -> ℕ64 -> ℕ64
(^) = ℕ64 -> ℕ64 -> ℕ64
forall a b. (Num a, Integral b) => a -> b -> a
(HS.^)
instance Bot ℕ64 where bot :: ℕ64
bot = ℕ64
forall a. Zero a => a
zero
instance Join ℕ64 where ⊔ :: ℕ64 -> ℕ64 -> ℕ64
(⊔) = ℕ64 -> ℕ64 -> ℕ64
forall a. Ord a => a -> a -> a
(⩏)
instance Top ℕ64 where top :: ℕ64
top = ℕ64
forall a. Bounded a => a
HS.maxBound
instance Meet ℕ64 where ⊓ :: ℕ64 -> ℕ64 -> ℕ64
(⊓) = ℕ64 -> ℕ64 -> ℕ64
forall a. Ord a => a -> a -> a
(⩎)
instance Null ℕ64 where null :: ℕ64
null = ℕ64
forall a. Zero a => a
zero
instance Append ℕ64 where ⧺ :: ℕ64 -> ℕ64 -> ℕ64
(⧺) = ℕ64 -> ℕ64 -> ℕ64
forall a. Plus a => a -> a -> a
(+)
instance Additive ℕ64
instance Multiplicative ℕ64
instance JoinLattice ℕ64
instance MeetLattice ℕ64
instance Monoid ℕ64
instance ToNat ℕ64 where nat :: ℕ64 -> ℕ
nat = ℕ64 -> ℕ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToNat64 ℕ64 where nat64 :: ℕ64 -> ℕ64
nat64 = ℕ64 -> ℕ64
forall a. a -> a
id
instance ToNatO32 ℕ64 where
natO32 :: ℕ64 -> 𝑂 ℕ32
natO32 ℕ64
n
| ℕ64
n ℕ64 -> ℕ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ32 -> ℕ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ32) = 𝑂 ℕ32
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ32 -> 𝑂 ℕ32
forall a. a -> 𝑂 a
Some (ℕ32 -> 𝑂 ℕ32) -> ℕ32 -> 𝑂 ℕ32
forall a b. (a -> b) -> a -> b
$ ℕ64 -> ℕ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ64
n
instance ToNatO16 ℕ64 where
natO16 :: ℕ64 -> 𝑂 ℕ16
natO16 ℕ64
n
| ℕ64
n ℕ64 -> ℕ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ16 -> ℕ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ16) = 𝑂 ℕ16
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ16 -> 𝑂 ℕ16
forall a. a -> 𝑂 a
Some (ℕ16 -> 𝑂 ℕ16) -> ℕ16 -> 𝑂 ℕ16
forall a b. (a -> b) -> a -> b
$ ℕ64 -> ℕ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ64
n
instance ToNatO8 ℕ64 where
natO8 :: ℕ64 -> 𝑂 ℕ8
natO8 ℕ64
n
| ℕ64
n ℕ64 -> ℕ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ8 -> ℕ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ8) = 𝑂 ℕ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ8 -> 𝑂 ℕ8
forall a. a -> 𝑂 a
Some (ℕ8 -> 𝑂 ℕ8) -> ℕ8 -> 𝑂 ℕ8
forall a b. (a -> b) -> a -> b
$ ℕ64 -> ℕ8
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ64
n
instance ToInt ℕ64 where int :: ℕ64 -> ℤ
int = ℕ64 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToIntO64 ℕ64 where
intO64 :: ℕ64 -> 𝑂 ℤ64
intO64 ℕ64
n
| ℕ64
n ℕ64 -> ℕ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ64 -> ℕ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ64) = 𝑂 ℤ64
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ64 -> 𝑂 ℤ64
forall a. a -> 𝑂 a
Some (ℤ64 -> 𝑂 ℤ64) -> ℤ64 -> 𝑂 ℤ64
forall a b. (a -> b) -> a -> b
$ ℕ64 -> ℤ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ64
n
instance ToIntO32 ℕ64 where
intO32 :: ℕ64 -> 𝑂 ℤ32
intO32 ℕ64
n
| ℕ64
n ℕ64 -> ℕ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ32 -> ℕ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ32) = 𝑂 ℤ32
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ32 -> 𝑂 ℤ32
forall a. a -> 𝑂 a
Some (ℤ32 -> 𝑂 ℤ32) -> ℤ32 -> 𝑂 ℤ32
forall a b. (a -> b) -> a -> b
$ ℕ64 -> ℤ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ64
n
instance ToIntO16 ℕ64 where
intO16 :: ℕ64 -> 𝑂 ℤ16
intO16 ℕ64
n
| ℕ64
n ℕ64 -> ℕ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ16 -> ℕ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ16) = 𝑂 ℤ16
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ16 -> 𝑂 ℤ16
forall a. a -> 𝑂 a
Some (ℤ16 -> 𝑂 ℤ16) -> ℤ16 -> 𝑂 ℤ16
forall a b. (a -> b) -> a -> b
$ ℕ64 -> ℤ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ64
n
instance ToIntO8 ℕ64 where
intO8 :: ℕ64 -> 𝑂 ℤ8
intO8 ℕ64
n
| ℕ64
n ℕ64 -> ℕ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ8 -> ℕ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ8) = 𝑂 ℤ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ8 -> 𝑂 ℤ8
forall a. a -> 𝑂 a
Some (ℤ8 -> 𝑂 ℤ8) -> ℤ8 -> 𝑂 ℤ8
forall a b. (a -> b) -> a -> b
$ ℕ64 -> ℤ8
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ64
n
instance ToRational ℕ64 where rat :: ℕ64 -> ℚ
rat = ℕ64 -> ℚ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToRationalᴾ ℕ64 where ratᴾ :: ℕ64 -> ℚᴾ
ratᴾ = ℕ64 -> ℚᴾ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToDouble ℕ64 where dbl :: ℕ64 -> 𝔻
dbl = ℕ64 -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToDoubleᴾ ℕ64 where dblᴾ :: ℕ64 -> 𝔻ᴾ
dblᴾ = 𝔻 -> 𝔻ᴾ
𝔻ᴾ (𝔻 -> 𝔻ᴾ) -> (ℕ64 -> 𝔻) -> ℕ64 -> 𝔻ᴾ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℕ64 -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToNumber ℕ64 where num :: ℕ64 -> ℝ
num = ℤ -> ℝ
Integer (ℤ -> ℝ) -> (ℕ64 -> ℤ) -> ℕ64 -> ℝ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℕ64 -> ℤ
forall a. ToInt a => a -> ℤ
int
instance ToNumberᴾ ℕ64 where numᴾ :: ℕ64 -> ℝᴾ
numᴾ = ℕ -> ℝᴾ
Natural (ℕ -> ℝᴾ) -> (ℕ64 -> ℕ) -> ℕ64 -> ℝᴾ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℕ64 -> ℕ
forall a. ToNat a => a -> ℕ
nat
instance Zero ℕ32 where zero :: ℕ32
zero = ℕ -> ℕ32
𝕟32 ℕ
0
instance Plus ℕ32 where + :: ℕ32 -> ℕ32 -> ℕ32
(+) = ℕ32 -> ℕ32 -> ℕ32
forall a. Num a => a -> a -> a
(HS.+)
instance Minus ℕ32 where (-) = ℕ32 -> ℕ32 -> ℕ32
forall a. Num a => a -> a -> a
(HS.-)
instance One ℕ32 where one :: ℕ32
one = ℕ -> ℕ32
𝕟32 ℕ
1
instance Times ℕ32 where × :: ℕ32 -> ℕ32 -> ℕ32
(×) = ℕ32 -> ℕ32 -> ℕ32
forall a. Num a => a -> a -> a
(HS.*)
instance DivMod ℕ32 where ⌿ :: ℕ32 -> ℕ32 -> ℕ32
(⌿) = ℕ32 -> ℕ32 -> ℕ32
forall a. Integral a => a -> a -> a
HS.div ; ÷ :: ℕ32 -> ℕ32 -> ℕ32
(÷) = ℕ32 -> ℕ32 -> ℕ32
forall a. Integral a => a -> a -> a
HS.mod
instance Pon ℕ32 where ^^ :: ℕ32 -> ℕ -> ℕ32
(^^) = ℕ32 -> ℕ -> ℕ32
forall a b. (Num a, Integral b) => a -> b -> a
(HS.^)
instance Pow ℕ32 where ^ :: ℕ32 -> ℕ32 -> ℕ32
(^) = ℕ32 -> ℕ32 -> ℕ32
forall a b. (Num a, Integral b) => a -> b -> a
(HS.^)
instance Bot ℕ32 where bot :: ℕ32
bot = ℕ -> ℕ32
𝕟32 ℕ
0
instance Join ℕ32 where ⊔ :: ℕ32 -> ℕ32 -> ℕ32
(⊔) = ℕ32 -> ℕ32 -> ℕ32
forall a. Ord a => a -> a -> a
(⩏)
instance Top ℕ32 where top :: ℕ32
top = ℕ32
forall a. Bounded a => a
HS.maxBound
instance Meet ℕ32 where ⊓ :: ℕ32 -> ℕ32 -> ℕ32
(⊓) = ℕ32 -> ℕ32 -> ℕ32
forall a. Ord a => a -> a -> a
(⩎)
instance Null ℕ32 where null :: ℕ32
null = ℕ32
forall a. Zero a => a
zero
instance Append ℕ32 where ⧺ :: ℕ32 -> ℕ32 -> ℕ32
(⧺) = ℕ32 -> ℕ32 -> ℕ32
forall a. Plus a => a -> a -> a
(+)
instance Additive ℕ32
instance Multiplicative ℕ32
instance JoinLattice ℕ32
instance MeetLattice ℕ32
instance Monoid ℕ32
instance ToNat ℕ32 where nat :: ℕ32 -> ℕ
nat = ℕ32 -> ℕ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToNat64 ℕ32 where nat64 :: ℕ32 -> ℕ64
nat64 = ℕ32 -> ℕ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToNat32 ℕ32 where nat32 :: ℕ32 -> ℕ32
nat32 = ℕ32 -> ℕ32
forall a. a -> a
id
instance ToNatO16 ℕ32 where
natO16 :: ℕ32 -> 𝑂 ℕ16
natO16 ℕ32
n
| ℕ32
n ℕ32 -> ℕ32 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ16 -> ℕ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ16) = 𝑂 ℕ16
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ16 -> 𝑂 ℕ16
forall a. a -> 𝑂 a
Some (ℕ16 -> 𝑂 ℕ16) -> ℕ16 -> 𝑂 ℕ16
forall a b. (a -> b) -> a -> b
$ ℕ32 -> ℕ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ32
n
instance ToNatO8 ℕ32 where
natO8 :: ℕ32 -> 𝑂 ℕ8
natO8 ℕ32
n
| ℕ32
n ℕ32 -> ℕ32 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ8 -> ℕ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ8) = 𝑂 ℕ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ8 -> 𝑂 ℕ8
forall a. a -> 𝑂 a
Some (ℕ8 -> 𝑂 ℕ8) -> ℕ8 -> 𝑂 ℕ8
forall a b. (a -> b) -> a -> b
$ ℕ32 -> ℕ8
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ32
n
instance ToInt ℕ32 where int :: ℕ32 -> ℤ
int = ℕ32 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToInt64 ℕ32 where int64 :: ℕ32 -> ℤ64
int64 = ℕ32 -> ℤ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToIntO32 ℕ32 where
intO32 :: ℕ32 -> 𝑂 ℤ32
intO32 ℕ32
n
| ℕ32
n ℕ32 -> ℕ32 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ32 -> ℕ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ32) = 𝑂 ℤ32
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ32 -> 𝑂 ℤ32
forall a. a -> 𝑂 a
Some (ℤ32 -> 𝑂 ℤ32) -> ℤ32 -> 𝑂 ℤ32
forall a b. (a -> b) -> a -> b
$ ℕ32 -> ℤ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ32
n
instance ToIntO16 ℕ32 where
intO16 :: ℕ32 -> 𝑂 ℤ16
intO16 ℕ32
n
| ℕ32
n ℕ32 -> ℕ32 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ16 -> ℕ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ16) = 𝑂 ℤ16
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ16 -> 𝑂 ℤ16
forall a. a -> 𝑂 a
Some (ℤ16 -> 𝑂 ℤ16) -> ℤ16 -> 𝑂 ℤ16
forall a b. (a -> b) -> a -> b
$ ℕ32 -> ℤ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ32
n
instance ToIntO8 ℕ32 where
intO8 :: ℕ32 -> 𝑂 ℤ8
intO8 ℕ32
n
| ℕ32
n ℕ32 -> ℕ32 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ8 -> ℕ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ8) = 𝑂 ℤ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ8 -> 𝑂 ℤ8
forall a. a -> 𝑂 a
Some (ℤ8 -> 𝑂 ℤ8) -> ℤ8 -> 𝑂 ℤ8
forall a b. (a -> b) -> a -> b
$ ℕ32 -> ℤ8
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ32
n
instance ToRational ℕ32 where rat :: ℕ32 -> ℚ
rat = ℕ32 -> ℚ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToRationalᴾ ℕ32 where ratᴾ :: ℕ32 -> ℚᴾ
ratᴾ = ℕ32 -> ℚᴾ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToDouble ℕ32 where dbl :: ℕ32 -> 𝔻
dbl = ℕ32 -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToDoubleᴾ ℕ32 where dblᴾ :: ℕ32 -> 𝔻ᴾ
dblᴾ = 𝔻 -> 𝔻ᴾ
𝔻ᴾ (𝔻 -> 𝔻ᴾ) -> (ℕ32 -> 𝔻) -> ℕ32 -> 𝔻ᴾ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℕ32 -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToNumber ℕ32 where num :: ℕ32 -> ℝ
num = ℤ -> ℝ
Integer (ℤ -> ℝ) -> (ℕ32 -> ℤ) -> ℕ32 -> ℝ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℕ32 -> ℤ
forall a. ToInt a => a -> ℤ
int
instance ToNumberᴾ ℕ32 where numᴾ :: ℕ32 -> ℝᴾ
numᴾ = ℕ -> ℝᴾ
Natural (ℕ -> ℝᴾ) -> (ℕ32 -> ℕ) -> ℕ32 -> ℝᴾ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℕ32 -> ℕ
forall a. ToNat a => a -> ℕ
nat
instance Zero ℕ16 where zero :: ℕ16
zero = ℕ -> ℕ16
𝕟16 ℕ
0
instance Plus ℕ16 where + :: ℕ16 -> ℕ16 -> ℕ16
(+) = ℕ16 -> ℕ16 -> ℕ16
forall a. Num a => a -> a -> a
(HS.+)
instance Minus ℕ16 where (-) = ℕ16 -> ℕ16 -> ℕ16
forall a. Num a => a -> a -> a
(HS.-)
instance One ℕ16 where one :: ℕ16
one = ℕ -> ℕ16
𝕟16 ℕ
1
instance Times ℕ16 where × :: ℕ16 -> ℕ16 -> ℕ16
(×) = ℕ16 -> ℕ16 -> ℕ16
forall a. Num a => a -> a -> a
(HS.*)
instance DivMod ℕ16 where ⌿ :: ℕ16 -> ℕ16 -> ℕ16
(⌿) = ℕ16 -> ℕ16 -> ℕ16
forall a. Integral a => a -> a -> a
HS.div ; ÷ :: ℕ16 -> ℕ16 -> ℕ16
(÷) = ℕ16 -> ℕ16 -> ℕ16
forall a. Integral a => a -> a -> a
HS.mod
instance Pon ℕ16 where ^^ :: ℕ16 -> ℕ -> ℕ16
(^^) = ℕ16 -> ℕ -> ℕ16
forall a b. (Num a, Integral b) => a -> b -> a
(HS.^)
instance Pow ℕ16 where ^ :: ℕ16 -> ℕ16 -> ℕ16
(^) = ℕ16 -> ℕ16 -> ℕ16
forall a b. (Num a, Integral b) => a -> b -> a
(HS.^)
instance Bot ℕ16 where bot :: ℕ16
bot = ℕ -> ℕ16
𝕟16 ℕ
0
instance Join ℕ16 where ⊔ :: ℕ16 -> ℕ16 -> ℕ16
(⊔) = ℕ16 -> ℕ16 -> ℕ16
forall a. Ord a => a -> a -> a
(⩏)
instance Top ℕ16 where top :: ℕ16
top = ℕ16
forall a. Bounded a => a
HS.maxBound
instance Meet ℕ16 where ⊓ :: ℕ16 -> ℕ16 -> ℕ16
(⊓) = ℕ16 -> ℕ16 -> ℕ16
forall a. Ord a => a -> a -> a
(⩎)
instance Null ℕ16 where null :: ℕ16
null = ℕ16
forall a. Zero a => a
zero
instance Append ℕ16 where ⧺ :: ℕ16 -> ℕ16 -> ℕ16
(⧺) = ℕ16 -> ℕ16 -> ℕ16
forall a. Plus a => a -> a -> a
(+)
instance Additive ℕ16
instance Multiplicative ℕ16
instance JoinLattice ℕ16
instance MeetLattice ℕ16
instance Monoid ℕ16
instance ToNat ℕ16 where nat :: ℕ16 -> ℕ
nat = ℕ16 -> ℕ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToNat64 ℕ16 where nat64 :: ℕ16 -> ℕ64
nat64 = ℕ16 -> ℕ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToNat32 ℕ16 where nat32 :: ℕ16 -> ℕ32
nat32 = ℕ16 -> ℕ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToNat16 ℕ16 where nat16 :: ℕ16 -> ℕ16
nat16 = ℕ16 -> ℕ16
forall a. a -> a
id
instance ToNatO8 ℕ16 where
natO8 :: ℕ16 -> 𝑂 ℕ8
natO8 ℕ16
n
| ℕ16
n ℕ16 -> ℕ16 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ8 -> ℕ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ8) = 𝑂 ℕ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ8 -> 𝑂 ℕ8
forall a. a -> 𝑂 a
Some (ℕ8 -> 𝑂 ℕ8) -> ℕ8 -> 𝑂 ℕ8
forall a b. (a -> b) -> a -> b
$ ℕ16 -> ℕ8
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ16
n
instance ToInt ℕ16 where int :: ℕ16 -> ℤ
int = ℕ16 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToInt64 ℕ16 where int64 :: ℕ16 -> ℤ64
int64 = ℕ16 -> ℤ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToInt32 ℕ16 where int32 :: ℕ16 -> ℤ32
int32 = ℕ16 -> ℤ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToIntO16 ℕ16 where
intO16 :: ℕ16 -> 𝑂 ℤ16
intO16 ℕ16
n
| ℕ16
n ℕ16 -> ℕ16 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ16 -> ℕ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ16) = 𝑂 ℤ16
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ16 -> 𝑂 ℤ16
forall a. a -> 𝑂 a
Some (ℤ16 -> 𝑂 ℤ16) -> ℤ16 -> 𝑂 ℤ16
forall a b. (a -> b) -> a -> b
$ ℕ16 -> ℤ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ16
n
instance ToIntO8 ℕ16 where
intO8 :: ℕ16 -> 𝑂 ℤ8
intO8 ℕ16
n
| ℕ16
n ℕ16 -> ℕ16 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ8 -> ℕ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ8) = 𝑂 ℤ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ8 -> 𝑂 ℤ8
forall a. a -> 𝑂 a
Some (ℤ8 -> 𝑂 ℤ8) -> ℤ8 -> 𝑂 ℤ8
forall a b. (a -> b) -> a -> b
$ ℕ16 -> ℤ8
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ16
n
instance ToRational ℕ16 where rat :: ℕ16 -> ℚ
rat = ℕ16 -> ℚ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToRationalᴾ ℕ16 where ratᴾ :: ℕ16 -> ℚᴾ
ratᴾ = ℕ16 -> ℚᴾ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToDouble ℕ16 where dbl :: ℕ16 -> 𝔻
dbl = ℕ16 -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToDoubleᴾ ℕ16 where dblᴾ :: ℕ16 -> 𝔻ᴾ
dblᴾ = 𝔻 -> 𝔻ᴾ
𝔻ᴾ (𝔻 -> 𝔻ᴾ) -> (ℕ16 -> 𝔻) -> ℕ16 -> 𝔻ᴾ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℕ16 -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToNumber ℕ16 where num :: ℕ16 -> ℝ
num = ℤ -> ℝ
Integer (ℤ -> ℝ) -> (ℕ16 -> ℤ) -> ℕ16 -> ℝ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℕ16 -> ℤ
forall a. ToInt a => a -> ℤ
int
instance ToNumberᴾ ℕ16 where numᴾ :: ℕ16 -> ℝᴾ
numᴾ = ℕ -> ℝᴾ
Natural (ℕ -> ℝᴾ) -> (ℕ16 -> ℕ) -> ℕ16 -> ℝᴾ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℕ16 -> ℕ
forall a. ToNat a => a -> ℕ
nat
instance Zero ℕ8 where zero :: ℕ8
zero = ℕ -> ℕ8
𝕟8 ℕ
0
instance Plus ℕ8 where + :: ℕ8 -> ℕ8 -> ℕ8
(+) = ℕ8 -> ℕ8 -> ℕ8
forall a. Num a => a -> a -> a
(HS.+)
instance Minus ℕ8 where (-) = ℕ8 -> ℕ8 -> ℕ8
forall a. Num a => a -> a -> a
(HS.-)
instance One ℕ8 where one :: ℕ8
one = ℕ -> ℕ8
𝕟8 ℕ
1
instance Times ℕ8 where × :: ℕ8 -> ℕ8 -> ℕ8
(×) = ℕ8 -> ℕ8 -> ℕ8
forall a. Num a => a -> a -> a
(HS.*)
instance DivMod ℕ8 where ⌿ :: ℕ8 -> ℕ8 -> ℕ8
(⌿) = ℕ8 -> ℕ8 -> ℕ8
forall a. Integral a => a -> a -> a
HS.div ; ÷ :: ℕ8 -> ℕ8 -> ℕ8
(÷) = ℕ8 -> ℕ8 -> ℕ8
forall a. Integral a => a -> a -> a
HS.mod
instance Pon ℕ8 where ^^ :: ℕ8 -> ℕ -> ℕ8
(^^) = ℕ8 -> ℕ -> ℕ8
forall a b. (Num a, Integral b) => a -> b -> a
(HS.^)
instance Pow ℕ8 where ^ :: ℕ8 -> ℕ8 -> ℕ8
(^) = ℕ8 -> ℕ8 -> ℕ8
forall a b. (Num a, Integral b) => a -> b -> a
(HS.^)
instance Bot ℕ8 where bot :: ℕ8
bot = ℕ -> ℕ8
𝕟8 ℕ
0
instance Join ℕ8 where ⊔ :: ℕ8 -> ℕ8 -> ℕ8
(⊔) = ℕ8 -> ℕ8 -> ℕ8
forall a. Ord a => a -> a -> a
(⩏)
instance Top ℕ8 where top :: ℕ8
top = ℕ8
forall a. Bounded a => a
HS.maxBound
instance Meet ℕ8 where ⊓ :: ℕ8 -> ℕ8 -> ℕ8
(⊓) = ℕ8 -> ℕ8 -> ℕ8
forall a. Ord a => a -> a -> a
(⩎)
instance Null ℕ8 where null :: ℕ8
null = ℕ8
forall a. Zero a => a
zero
instance Append ℕ8 where ⧺ :: ℕ8 -> ℕ8 -> ℕ8
(⧺) = ℕ8 -> ℕ8 -> ℕ8
forall a. Plus a => a -> a -> a
(+)
instance Additive ℕ8
instance Multiplicative ℕ8
instance JoinLattice ℕ8
instance MeetLattice ℕ8
instance Monoid ℕ8
instance ToNat ℕ8 where nat :: ℕ8 -> ℕ
nat = ℕ8 -> ℕ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToNat64 ℕ8 where nat64 :: ℕ8 -> ℕ64
nat64 = ℕ8 -> ℕ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToNat32 ℕ8 where nat32 :: ℕ8 -> ℕ32
nat32 = ℕ8 -> ℕ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToNat16 ℕ8 where nat16 :: ℕ8 -> ℕ16
nat16 = ℕ8 -> ℕ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToNat8 ℕ8 where nat8 :: ℕ8 -> ℕ8
nat8 = ℕ8 -> ℕ8
forall a. a -> a
id
instance ToInt ℕ8 where int :: ℕ8 -> ℤ
int = ℕ8 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToInt64 ℕ8 where int64 :: ℕ8 -> ℤ64
int64 = ℕ8 -> ℤ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToInt32 ℕ8 where int32 :: ℕ8 -> ℤ32
int32 = ℕ8 -> ℤ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToInt16 ℕ8 where int16 :: ℕ8 -> ℤ16
int16 = ℕ8 -> ℤ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToIntO8 ℕ8 where
intO8 :: ℕ8 -> 𝑂 ℤ8
intO8 ℕ8
n
| ℕ8
n ℕ8 -> ℕ8 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ8 -> ℕ8
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ8) = 𝑂 ℤ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ8 -> 𝑂 ℤ8
forall a. a -> 𝑂 a
Some (ℤ8 -> 𝑂 ℤ8) -> ℤ8 -> 𝑂 ℤ8
forall a b. (a -> b) -> a -> b
$ ℕ8 -> ℤ8
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℕ8
n
instance ToRational ℕ8 where rat :: ℕ8 -> ℚ
rat = ℕ8 -> ℚ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToRationalᴾ ℕ8 where ratᴾ :: ℕ8 -> ℚᴾ
ratᴾ = ℕ8 -> ℚᴾ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToDouble ℕ8 where dbl :: ℕ8 -> 𝔻
dbl = ℕ8 -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToDoubleᴾ ℕ8 where dblᴾ :: ℕ8 -> 𝔻ᴾ
dblᴾ = 𝔻 -> 𝔻ᴾ
𝔻ᴾ (𝔻 -> 𝔻ᴾ) -> (ℕ8 -> 𝔻) -> ℕ8 -> 𝔻ᴾ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℕ8 -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToNumber ℕ8 where num :: ℕ8 -> ℝ
num = ℤ -> ℝ
Integer (ℤ -> ℝ) -> (ℕ8 -> ℤ) -> ℕ8 -> ℝ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℕ8 -> ℤ
forall a. ToInt a => a -> ℤ
int
instance ToNumberᴾ ℕ8 where numᴾ :: ℕ8 -> ℝᴾ
numᴾ = ℕ -> ℝᴾ
Natural (ℕ -> ℝᴾ) -> (ℕ8 -> ℕ) -> ℕ8 -> ℝᴾ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℕ8 -> ℕ
forall a. ToNat a => a -> ℕ
nat
instance Zero ℤ where zero :: ℤ
zero = ℕ -> ℤ
𝕫 ℕ
0
instance Plus ℤ where + :: ℤ -> ℤ -> ℤ
(+) = ℤ -> ℤ -> ℤ
forall a. Num a => a -> a -> a
(HS.+)
instance Minus ℤ where (-) = ℤ -> ℤ -> ℤ
forall a. Num a => a -> a -> a
(HS.-)
instance One ℤ where one :: ℤ
one = ℕ -> ℤ
𝕫 ℕ
1
instance Times ℤ where × :: ℤ -> ℤ -> ℤ
(×) = ℤ -> ℤ -> ℤ
forall a. Num a => a -> a -> a
(HS.*)
instance DivMod ℤ where ⌿ :: ℤ -> ℤ -> ℤ
(⌿) = ℤ -> ℤ -> ℤ
forall a. Integral a => a -> a -> a
HS.div ; ÷ :: ℤ -> ℤ -> ℤ
(÷) = ℤ -> ℤ -> ℤ
forall a. Integral a => a -> a -> a
HS.mod
instance Pon ℤ where ^^ :: ℤ -> ℕ -> ℤ
(^^) = ℤ -> ℕ -> ℤ
forall a b. (Num a, Integral b) => a -> b -> a
(HS.^)
instance Join ℤ where ⊔ :: ℤ -> ℤ -> ℤ
(⊔) = ℤ -> ℤ -> ℤ
forall a. Ord a => a -> a -> a
(⩏)
instance Meet ℤ where ⊓ :: ℤ -> ℤ -> ℤ
(⊓) = ℤ -> ℤ -> ℤ
forall a. Ord a => a -> a -> a
(⩎)
instance Null ℤ where null :: ℤ
null = ℤ
forall a. Zero a => a
zero
instance Append ℤ where ⧺ :: ℤ -> ℤ -> ℤ
(⧺) = ℤ -> ℤ -> ℤ
forall a. Plus a => a -> a -> a
(+)
instance Additive ℤ
instance Multiplicative ℤ
instance Monoid ℤ
instance ToNatO ℤ where
natO :: ℤ -> 𝑂 ℕ
natO ℤ
i
| ℤ
i ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ
𝕫 ℕ
0 = 𝑂 ℕ
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ -> 𝑂 ℕ
forall a. a -> 𝑂 a
Some (ℕ -> 𝑂 ℕ) -> ℕ -> 𝑂 ℕ
forall a b. (a -> b) -> a -> b
$ ℤ -> ℕ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ
i
instance ToNatO64 ℤ where
natO64 :: ℤ -> 𝑂 ℕ64
natO64 ℤ
i
| ℤ
i ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ
𝕫 ℕ
0 = 𝑂 ℕ64
forall a. 𝑂 a
None
| ℤ
i ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ64 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ64) = 𝑂 ℕ64
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ64 -> 𝑂 ℕ64
forall a. a -> 𝑂 a
Some (ℕ64 -> 𝑂 ℕ64) -> ℕ64 -> 𝑂 ℕ64
forall a b. (a -> b) -> a -> b
$ ℤ -> ℕ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ
i
instance ToNatO32 ℤ where
natO32 :: ℤ -> 𝑂 ℕ32
natO32 ℤ
i
| ℤ
i ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ
𝕫 ℕ
0 = 𝑂 ℕ32
forall a. 𝑂 a
None
| ℤ
i ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ32 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ32) = 𝑂 ℕ32
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ32 -> 𝑂 ℕ32
forall a. a -> 𝑂 a
Some (ℕ32 -> 𝑂 ℕ32) -> ℕ32 -> 𝑂 ℕ32
forall a b. (a -> b) -> a -> b
$ ℤ -> ℕ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ
i
instance ToNatO16 ℤ where
natO16 :: ℤ -> 𝑂 ℕ16
natO16 ℤ
i
| ℤ
i ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ
𝕫 ℕ
0 = 𝑂 ℕ16
forall a. 𝑂 a
None
| ℤ
i ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ16 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ16) = 𝑂 ℕ16
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ16 -> 𝑂 ℕ16
forall a. a -> 𝑂 a
Some (ℕ16 -> 𝑂 ℕ16) -> ℕ16 -> 𝑂 ℕ16
forall a b. (a -> b) -> a -> b
$ ℤ -> ℕ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ
i
instance ToNatO8 ℤ where
natO8 :: ℤ -> 𝑂 ℕ8
natO8 ℤ
i
| ℤ
i ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ
𝕫 ℕ
0 = 𝑂 ℕ8
forall a. 𝑂 a
None
| ℤ
i ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ8 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ8) = 𝑂 ℕ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ8 -> 𝑂 ℕ8
forall a. a -> 𝑂 a
Some (ℕ8 -> 𝑂 ℕ8) -> ℕ8 -> 𝑂 ℕ8
forall a b. (a -> b) -> a -> b
$ ℤ -> ℕ8
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ
i
instance ToInt ℤ where int :: ℤ -> ℤ
int = ℤ -> ℤ
forall a. a -> a
id
instance ToIntO64 ℤ where
intO64 :: ℤ -> 𝑂 ℤ64
intO64 ℤ
i
| ℤ
i ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℤ64 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.minBound @ℤ64) = 𝑂 ℤ64
forall a. 𝑂 a
None
| ℤ
i ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ64 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ64) = 𝑂 ℤ64
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ64 -> 𝑂 ℤ64
forall a. a -> 𝑂 a
Some (ℤ64 -> 𝑂 ℤ64) -> ℤ64 -> 𝑂 ℤ64
forall a b. (a -> b) -> a -> b
$ ℤ -> ℤ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ
i
instance ToIntO32 ℤ where
intO32 :: ℤ -> 𝑂 ℤ32
intO32 ℤ
i
| ℤ
i ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℤ32 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.minBound @ℤ32) = 𝑂 ℤ32
forall a. 𝑂 a
None
| ℤ
i ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ32 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ32) = 𝑂 ℤ32
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ32 -> 𝑂 ℤ32
forall a. a -> 𝑂 a
Some (ℤ32 -> 𝑂 ℤ32) -> ℤ32 -> 𝑂 ℤ32
forall a b. (a -> b) -> a -> b
$ ℤ -> ℤ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ
i
instance ToIntO16 ℤ where
intO16 :: ℤ -> 𝑂 ℤ16
intO16 ℤ
i
| ℤ
i ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℤ16 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.minBound @ℤ16) = 𝑂 ℤ16
forall a. 𝑂 a
None
| ℤ
i ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ16 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ16) = 𝑂 ℤ16
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ16 -> 𝑂 ℤ16
forall a. a -> 𝑂 a
Some (ℤ16 -> 𝑂 ℤ16) -> ℤ16 -> 𝑂 ℤ16
forall a b. (a -> b) -> a -> b
$ ℤ -> ℤ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ
i
instance ToIntO8 ℤ where
intO8 :: ℤ -> 𝑂 ℤ8
intO8 ℤ
i
| ℤ
i ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℤ8 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.minBound @ℤ8) = 𝑂 ℤ8
forall a. 𝑂 a
None
| ℤ
i ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ8 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ8) = 𝑂 ℤ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ8 -> 𝑂 ℤ8
forall a. a -> 𝑂 a
Some (ℤ8 -> 𝑂 ℤ8) -> ℤ8 -> 𝑂 ℤ8
forall a b. (a -> b) -> a -> b
$ ℤ -> ℤ8
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ
i
instance ToRational ℤ where rat :: ℤ -> ℚ
rat = ℤ -> ℚ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToRationalᴾO ℤ where
ratᴾO :: ℤ -> 𝑂 ℚᴾ
ratᴾO ℤ
i
| ℤ
i ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ
𝕫 ℕ
0 = 𝑂 ℚᴾ
forall a. 𝑂 a
None
| 𝔹
otherwise = ℚᴾ -> 𝑂 ℚᴾ
forall a. a -> 𝑂 a
Some (ℚᴾ -> 𝑂 ℚᴾ) -> ℚᴾ -> 𝑂 ℚᴾ
forall a b. (a -> b) -> a -> b
$ ℤ -> ℚᴾ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ
i
instance ToDouble ℤ where dbl :: ℤ -> 𝔻
dbl = ℤ -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToDoubleᴾO ℤ where
dblᴾO :: ℤ -> 𝑂 𝔻ᴾ
dblᴾO ℤ
i
| ℤ
i ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ
𝕫 ℕ
0 = 𝑂 𝔻ᴾ
forall a. 𝑂 a
None
| 𝔹
otherwise = 𝔻ᴾ -> 𝑂 𝔻ᴾ
forall a. a -> 𝑂 a
Some (𝔻ᴾ -> 𝑂 𝔻ᴾ) -> 𝔻ᴾ -> 𝑂 𝔻ᴾ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻ᴾ
𝔻ᴾ (𝔻 -> 𝔻ᴾ) -> 𝔻 -> 𝔻ᴾ
forall a b. (a -> b) -> a -> b
$ ℤ -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ
i
instance ToNumber ℤ where num :: ℤ -> ℝ
num = ℤ -> ℝ
Integer
instance ToNumberᴾO ℤ where
numᴾO :: ℤ -> 𝑂 ℝᴾ
numᴾO ℤ
i = case ℤ -> 𝑂 ℕ
forall a. ToNatO a => a -> 𝑂 ℕ
natO ℤ
i of
𝑂 ℕ
None → 𝑂 ℝᴾ
forall a. 𝑂 a
None
Some ℕ
n → ℝᴾ -> 𝑂 ℝᴾ
forall a. a -> 𝑂 a
Some (ℝᴾ -> 𝑂 ℝᴾ) -> ℝᴾ -> 𝑂 ℝᴾ
forall a b. (a -> b) -> a -> b
$ ℕ -> ℝᴾ
Natural ℕ
n
instance Zero ℤ64 where zero :: ℤ64
zero = ℕ -> ℤ64
𝕫64 ℕ
0
instance Plus ℤ64 where + :: ℤ64 -> ℤ64 -> ℤ64
(+) = ℤ64 -> ℤ64 -> ℤ64
forall a. Num a => a -> a -> a
(HS.+)
instance Minus ℤ64 where (-) = ℤ64 -> ℤ64 -> ℤ64
forall a. Num a => a -> a -> a
(HS.-)
instance One ℤ64 where one :: ℤ64
one = ℕ -> ℤ64
𝕫64 ℕ
1
instance Times ℤ64 where × :: ℤ64 -> ℤ64 -> ℤ64
(×) = ℤ64 -> ℤ64 -> ℤ64
forall a. Num a => a -> a -> a
(HS.*)
instance DivMod ℤ64 where ⌿ :: ℤ64 -> ℤ64 -> ℤ64
(⌿) = ℤ64 -> ℤ64 -> ℤ64
forall a. Integral a => a -> a -> a
HS.div ; ÷ :: ℤ64 -> ℤ64 -> ℤ64
(÷) = ℤ64 -> ℤ64 -> ℤ64
forall a. Integral a => a -> a -> a
HS.mod
instance Pon ℤ64 where ^^ :: ℤ64 -> ℕ -> ℤ64
(^^) = ℤ64 -> ℕ -> ℤ64
forall a b. (Num a, Integral b) => a -> b -> a
(HS.^)
instance Bot ℤ64 where bot :: ℤ64
bot = ℤ64
forall a. Bounded a => a
HS.minBound
instance Join ℤ64 where ⊔ :: ℤ64 -> ℤ64 -> ℤ64
(⊔) = ℤ64 -> ℤ64 -> ℤ64
forall a. Ord a => a -> a -> a
(⩏)
instance Top ℤ64 where top :: ℤ64
top = ℤ64
forall a. Bounded a => a
HS.maxBound
instance Meet ℤ64 where ⊓ :: ℤ64 -> ℤ64 -> ℤ64
(⊓) = ℤ64 -> ℤ64 -> ℤ64
forall a. Ord a => a -> a -> a
(⩎)
instance Null ℤ64 where null :: ℤ64
null = ℤ64
forall a. Zero a => a
zero
instance Append ℤ64 where ⧺ :: ℤ64 -> ℤ64 -> ℤ64
(⧺) = ℤ64 -> ℤ64 -> ℤ64
forall a. Plus a => a -> a -> a
(+)
instance Additive ℤ64
instance Multiplicative ℤ64
instance JoinLattice ℤ64
instance MeetLattice ℤ64
instance Monoid ℤ64
instance ToNatO ℤ64 where
natO :: ℤ64 -> 𝑂 ℕ
natO ℤ64
i
| ℤ64
i ℤ64 -> ℤ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ64
𝕫64 ℕ
0 = 𝑂 ℕ
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ -> 𝑂 ℕ
forall a. a -> 𝑂 a
Some (ℕ -> 𝑂 ℕ) -> ℕ -> 𝑂 ℕ
forall a b. (a -> b) -> a -> b
$ ℤ64 -> ℕ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ64
i
instance ToNatO64 ℤ64 where
natO64 :: ℤ64 -> 𝑂 ℕ64
natO64 ℤ64
i
| ℤ64
i ℤ64 -> ℤ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ64
𝕫64 ℕ
0 = 𝑂 ℕ64
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ64 -> 𝑂 ℕ64
forall a. a -> 𝑂 a
Some (ℕ64 -> 𝑂 ℕ64) -> ℕ64 -> 𝑂 ℕ64
forall a b. (a -> b) -> a -> b
$ ℤ64 -> ℕ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ64
i
instance ToNatO32 ℤ64 where
natO32 :: ℤ64 -> 𝑂 ℕ32
natO32 ℤ64
i
| ℤ64
i ℤ64 -> ℤ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ64
𝕫64 ℕ
0 = 𝑂 ℕ32
forall a. 𝑂 a
None
| ℤ64
i ℤ64 -> ℤ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ32 -> ℤ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ32) = 𝑂 ℕ32
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ32 -> 𝑂 ℕ32
forall a. a -> 𝑂 a
Some (ℕ32 -> 𝑂 ℕ32) -> ℕ32 -> 𝑂 ℕ32
forall a b. (a -> b) -> a -> b
$ ℤ64 -> ℕ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ64
i
instance ToNatO16 ℤ64 where
natO16 :: ℤ64 -> 𝑂 ℕ16
natO16 ℤ64
i
| ℤ64
i ℤ64 -> ℤ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ64
𝕫64 ℕ
0 = 𝑂 ℕ16
forall a. 𝑂 a
None
| ℤ64
i ℤ64 -> ℤ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ16 -> ℤ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ16) = 𝑂 ℕ16
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ16 -> 𝑂 ℕ16
forall a. a -> 𝑂 a
Some (ℕ16 -> 𝑂 ℕ16) -> ℕ16 -> 𝑂 ℕ16
forall a b. (a -> b) -> a -> b
$ ℤ64 -> ℕ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ64
i
instance ToNatO8 ℤ64 where
natO8 :: ℤ64 -> 𝑂 ℕ8
natO8 ℤ64
i
| ℤ64
i ℤ64 -> ℤ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ64
𝕫64 ℕ
0 = 𝑂 ℕ8
forall a. 𝑂 a
None
| ℤ64
i ℤ64 -> ℤ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ8 -> ℤ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ8) = 𝑂 ℕ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ8 -> 𝑂 ℕ8
forall a. a -> 𝑂 a
Some (ℕ8 -> 𝑂 ℕ8) -> ℕ8 -> 𝑂 ℕ8
forall a b. (a -> b) -> a -> b
$ ℤ64 -> ℕ8
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ64
i
instance ToInt ℤ64 where int :: ℤ64 -> ℤ
int = ℤ64 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToInt64 ℤ64 where int64 :: ℤ64 -> ℤ64
int64 = ℤ64 -> ℤ64
forall a. a -> a
id
instance ToIntO32 ℤ64 where
intO32 :: ℤ64 -> 𝑂 ℤ32
intO32 ℤ64
i
| ℤ64
i ℤ64 -> ℤ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℤ32 -> ℤ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.minBound @ℤ32) = 𝑂 ℤ32
forall a. 𝑂 a
None
| ℤ64
i ℤ64 -> ℤ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ32 -> ℤ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ32) = 𝑂 ℤ32
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ32 -> 𝑂 ℤ32
forall a. a -> 𝑂 a
Some (ℤ32 -> 𝑂 ℤ32) -> ℤ32 -> 𝑂 ℤ32
forall a b. (a -> b) -> a -> b
$ ℤ64 -> ℤ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ64
i
instance ToIntO16 ℤ64 where
intO16 :: ℤ64 -> 𝑂 ℤ16
intO16 ℤ64
i
| ℤ64
i ℤ64 -> ℤ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℤ16 -> ℤ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.minBound @ℤ16) = 𝑂 ℤ16
forall a. 𝑂 a
None
| ℤ64
i ℤ64 -> ℤ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ16 -> ℤ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ16) = 𝑂 ℤ16
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ16 -> 𝑂 ℤ16
forall a. a -> 𝑂 a
Some (ℤ16 -> 𝑂 ℤ16) -> ℤ16 -> 𝑂 ℤ16
forall a b. (a -> b) -> a -> b
$ ℤ64 -> ℤ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ64
i
instance ToIntO8 ℤ64 where
intO8 :: ℤ64 -> 𝑂 ℤ8
intO8 ℤ64
i
| ℤ64
i ℤ64 -> ℤ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℤ8 -> ℤ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.minBound @ℤ8) = 𝑂 ℤ8
forall a. 𝑂 a
None
| ℤ64
i ℤ64 -> ℤ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ8 -> ℤ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ8) = 𝑂 ℤ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ8 -> 𝑂 ℤ8
forall a. a -> 𝑂 a
Some (ℤ8 -> 𝑂 ℤ8) -> ℤ8 -> 𝑂 ℤ8
forall a b. (a -> b) -> a -> b
$ ℤ64 -> ℤ8
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ64
i
instance ToRational ℤ64 where rat :: ℤ64 -> ℚ
rat = ℤ64 -> ℚ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToRationalᴾO ℤ64 where
ratᴾO :: ℤ64 -> 𝑂 ℚᴾ
ratᴾO ℤ64
i
| ℤ64
i ℤ64 -> ℤ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ64
𝕫64 ℕ
0 = 𝑂 ℚᴾ
forall a. 𝑂 a
None
| 𝔹
otherwise = ℚᴾ -> 𝑂 ℚᴾ
forall a. a -> 𝑂 a
Some (ℚᴾ -> 𝑂 ℚᴾ) -> ℚᴾ -> 𝑂 ℚᴾ
forall a b. (a -> b) -> a -> b
$ ℤ64 -> ℚᴾ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ64
i
instance ToDouble ℤ64 where dbl :: ℤ64 -> 𝔻
dbl = ℤ64 -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToDoubleᴾO ℤ64 where
dblᴾO :: ℤ64 -> 𝑂 𝔻ᴾ
dblᴾO ℤ64
i
| ℤ64
i ℤ64 -> ℤ64 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ64
𝕫64 ℕ
0 = 𝑂 𝔻ᴾ
forall a. 𝑂 a
None
| 𝔹
otherwise = 𝔻ᴾ -> 𝑂 𝔻ᴾ
forall a. a -> 𝑂 a
Some (𝔻ᴾ -> 𝑂 𝔻ᴾ) -> 𝔻ᴾ -> 𝑂 𝔻ᴾ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻ᴾ
𝔻ᴾ (𝔻 -> 𝔻ᴾ) -> 𝔻 -> 𝔻ᴾ
forall a b. (a -> b) -> a -> b
$ ℤ64 -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ64
i
instance ToNumber ℤ64 where num :: ℤ64 -> ℝ
num = ℤ -> ℝ
Integer (ℤ -> ℝ) -> (ℤ64 -> ℤ) -> ℤ64 -> ℝ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℤ64 -> ℤ
forall a. ToInt a => a -> ℤ
int
instance ToNumberᴾO ℤ64 where
numᴾO :: ℤ64 -> 𝑂 ℝᴾ
numᴾO ℤ64
i = case ℤ64 -> 𝑂 ℕ
forall a. ToNatO a => a -> 𝑂 ℕ
natO ℤ64
i of
𝑂 ℕ
None → 𝑂 ℝᴾ
forall a. 𝑂 a
None
Some ℕ
n → ℝᴾ -> 𝑂 ℝᴾ
forall a. a -> 𝑂 a
Some (ℝᴾ -> 𝑂 ℝᴾ) -> ℝᴾ -> 𝑂 ℝᴾ
forall a b. (a -> b) -> a -> b
$ ℕ -> ℝᴾ
Natural ℕ
n
instance Zero ℤ32 where zero :: ℤ32
zero = ℕ -> ℤ32
𝕫32 ℕ
0
instance Plus ℤ32 where + :: ℤ32 -> ℤ32 -> ℤ32
(+) = ℤ32 -> ℤ32 -> ℤ32
forall a. Num a => a -> a -> a
(HS.+)
instance Minus ℤ32 where (-) = ℤ32 -> ℤ32 -> ℤ32
forall a. Num a => a -> a -> a
(HS.-)
instance One ℤ32 where one :: ℤ32
one = ℕ -> ℤ32
𝕫32 ℕ
1
instance Times ℤ32 where × :: ℤ32 -> ℤ32 -> ℤ32
(×) = ℤ32 -> ℤ32 -> ℤ32
forall a. Num a => a -> a -> a
(HS.*)
instance DivMod ℤ32 where ⌿ :: ℤ32 -> ℤ32 -> ℤ32
(⌿) = ℤ32 -> ℤ32 -> ℤ32
forall a. Integral a => a -> a -> a
HS.div ; ÷ :: ℤ32 -> ℤ32 -> ℤ32
(÷) = ℤ32 -> ℤ32 -> ℤ32
forall a. Integral a => a -> a -> a
HS.mod
instance Pon ℤ32 where ^^ :: ℤ32 -> ℕ -> ℤ32
(^^) = ℤ32 -> ℕ -> ℤ32
forall a b. (Num a, Integral b) => a -> b -> a
(HS.^)
instance Bot ℤ32 where bot :: ℤ32
bot = ℤ32
forall a. Bounded a => a
HS.minBound
instance Join ℤ32 where ⊔ :: ℤ32 -> ℤ32 -> ℤ32
(⊔) = ℤ32 -> ℤ32 -> ℤ32
forall a. Ord a => a -> a -> a
(⩏)
instance Top ℤ32 where top :: ℤ32
top = ℤ32
forall a. Bounded a => a
HS.maxBound
instance Meet ℤ32 where ⊓ :: ℤ32 -> ℤ32 -> ℤ32
(⊓) = ℤ32 -> ℤ32 -> ℤ32
forall a. Ord a => a -> a -> a
(⩎)
instance Null ℤ32 where null :: ℤ32
null = ℤ32
forall a. Zero a => a
zero
instance Append ℤ32 where ⧺ :: ℤ32 -> ℤ32 -> ℤ32
(⧺) = ℤ32 -> ℤ32 -> ℤ32
forall a. Plus a => a -> a -> a
(+)
instance Additive ℤ32
instance Multiplicative ℤ32
instance JoinLattice ℤ32
instance MeetLattice ℤ32
instance Monoid ℤ32
instance ToNatO ℤ32 where
natO :: ℤ32 -> 𝑂 ℕ
natO ℤ32
i
| ℤ32
i ℤ32 -> ℤ32 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ32
𝕫32 ℕ
0 = 𝑂 ℕ
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ -> 𝑂 ℕ
forall a. a -> 𝑂 a
Some (ℕ -> 𝑂 ℕ) -> ℕ -> 𝑂 ℕ
forall a b. (a -> b) -> a -> b
$ ℤ32 -> ℕ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ32
i
instance ToNatO64 ℤ32 where
natO64 :: ℤ32 -> 𝑂 ℕ64
natO64 ℤ32
i
| ℤ32
i ℤ32 -> ℤ32 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ32
𝕫32 ℕ
0 = 𝑂 ℕ64
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ64 -> 𝑂 ℕ64
forall a. a -> 𝑂 a
Some (ℕ64 -> 𝑂 ℕ64) -> ℕ64 -> 𝑂 ℕ64
forall a b. (a -> b) -> a -> b
$ ℤ32 -> ℕ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ32
i
instance ToNatO32 ℤ32 where
natO32 :: ℤ32 -> 𝑂 ℕ32
natO32 ℤ32
i
| ℤ32
i ℤ32 -> ℤ32 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ32
𝕫32 ℕ
0 = 𝑂 ℕ32
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ32 -> 𝑂 ℕ32
forall a. a -> 𝑂 a
Some (ℕ32 -> 𝑂 ℕ32) -> ℕ32 -> 𝑂 ℕ32
forall a b. (a -> b) -> a -> b
$ ℤ32 -> ℕ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ32
i
instance ToNatO16 ℤ32 where
natO16 :: ℤ32 -> 𝑂 ℕ16
natO16 ℤ32
i
| ℤ32
i ℤ32 -> ℤ32 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ32
𝕫32 ℕ
0 = 𝑂 ℕ16
forall a. 𝑂 a
None
| ℤ32
i ℤ32 -> ℤ32 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ16 -> ℤ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ16) = 𝑂 ℕ16
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ16 -> 𝑂 ℕ16
forall a. a -> 𝑂 a
Some (ℕ16 -> 𝑂 ℕ16) -> ℕ16 -> 𝑂 ℕ16
forall a b. (a -> b) -> a -> b
$ ℤ32 -> ℕ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ32
i
instance ToNatO8 ℤ32 where
natO8 :: ℤ32 -> 𝑂 ℕ8
natO8 ℤ32
i
| ℤ32
i ℤ32 -> ℤ32 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ32
𝕫32 ℕ
0 = 𝑂 ℕ8
forall a. 𝑂 a
None
| ℤ32
i ℤ32 -> ℤ32 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ8 -> ℤ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ8) = 𝑂 ℕ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ8 -> 𝑂 ℕ8
forall a. a -> 𝑂 a
Some (ℕ8 -> 𝑂 ℕ8) -> ℕ8 -> 𝑂 ℕ8
forall a b. (a -> b) -> a -> b
$ ℤ32 -> ℕ8
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ32
i
instance ToInt ℤ32 where int :: ℤ32 -> ℤ
int = ℤ32 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToInt64 ℤ32 where int64 :: ℤ32 -> ℤ64
int64 = ℤ32 -> ℤ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToInt32 ℤ32 where int32 :: ℤ32 -> ℤ32
int32 = ℤ32 -> ℤ32
forall a. a -> a
id
instance ToIntO16 ℤ32 where
intO16 :: ℤ32 -> 𝑂 ℤ16
intO16 ℤ32
i
| ℤ32
i ℤ32 -> ℤ32 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℤ16 -> ℤ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.minBound @ℤ16) = 𝑂 ℤ16
forall a. 𝑂 a
None
| ℤ32
i ℤ32 -> ℤ32 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ16 -> ℤ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ16) = 𝑂 ℤ16
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ16 -> 𝑂 ℤ16
forall a. a -> 𝑂 a
Some (ℤ16 -> 𝑂 ℤ16) -> ℤ16 -> 𝑂 ℤ16
forall a b. (a -> b) -> a -> b
$ ℤ32 -> ℤ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ32
i
instance ToIntO8 ℤ32 where
intO8 :: ℤ32 -> 𝑂 ℤ8
intO8 ℤ32
i
| ℤ32
i ℤ32 -> ℤ32 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℤ8 -> ℤ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.minBound @ℤ8) = 𝑂 ℤ8
forall a. 𝑂 a
None
| ℤ32
i ℤ32 -> ℤ32 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ8 -> ℤ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ8) = 𝑂 ℤ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ8 -> 𝑂 ℤ8
forall a. a -> 𝑂 a
Some (ℤ8 -> 𝑂 ℤ8) -> ℤ8 -> 𝑂 ℤ8
forall a b. (a -> b) -> a -> b
$ ℤ32 -> ℤ8
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ32
i
instance ToRational ℤ32 where rat :: ℤ32 -> ℚ
rat = ℤ32 -> ℚ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToRationalᴾO ℤ32 where
ratᴾO :: ℤ32 -> 𝑂 ℚᴾ
ratᴾO ℤ32
i
| ℤ32
i ℤ32 -> ℤ32 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ32
𝕫32 ℕ
0 = 𝑂 ℚᴾ
forall a. 𝑂 a
None
| 𝔹
otherwise = ℚᴾ -> 𝑂 ℚᴾ
forall a. a -> 𝑂 a
Some (ℚᴾ -> 𝑂 ℚᴾ) -> ℚᴾ -> 𝑂 ℚᴾ
forall a b. (a -> b) -> a -> b
$ ℤ32 -> ℚᴾ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ32
i
instance ToDouble ℤ32 where dbl :: ℤ32 -> 𝔻
dbl = ℤ32 -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToDoubleᴾO ℤ32 where
dblᴾO :: ℤ32 -> 𝑂 𝔻ᴾ
dblᴾO ℤ32
i
| ℤ32
i ℤ32 -> ℤ32 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ32
𝕫32 ℕ
0 = 𝑂 𝔻ᴾ
forall a. 𝑂 a
None
| 𝔹
otherwise = 𝔻ᴾ -> 𝑂 𝔻ᴾ
forall a. a -> 𝑂 a
Some (𝔻ᴾ -> 𝑂 𝔻ᴾ) -> 𝔻ᴾ -> 𝑂 𝔻ᴾ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻ᴾ
𝔻ᴾ (𝔻 -> 𝔻ᴾ) -> 𝔻 -> 𝔻ᴾ
forall a b. (a -> b) -> a -> b
$ ℤ32 -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ32
i
instance ToNumber ℤ32 where num :: ℤ32 -> ℝ
num = ℤ -> ℝ
Integer (ℤ -> ℝ) -> (ℤ32 -> ℤ) -> ℤ32 -> ℝ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℤ32 -> ℤ
forall a. ToInt a => a -> ℤ
int
instance ToNumberᴾO ℤ32 where
numᴾO :: ℤ32 -> 𝑂 ℝᴾ
numᴾO ℤ32
i = case ℤ32 -> 𝑂 ℕ
forall a. ToNatO a => a -> 𝑂 ℕ
natO ℤ32
i of
𝑂 ℕ
None → 𝑂 ℝᴾ
forall a. 𝑂 a
None
Some ℕ
n → ℝᴾ -> 𝑂 ℝᴾ
forall a. a -> 𝑂 a
Some (ℝᴾ -> 𝑂 ℝᴾ) -> ℝᴾ -> 𝑂 ℝᴾ
forall a b. (a -> b) -> a -> b
$ ℕ -> ℝᴾ
Natural ℕ
n
instance Zero ℤ16 where zero :: ℤ16
zero = ℕ -> ℤ16
𝕫16 ℕ
0
instance Plus ℤ16 where + :: ℤ16 -> ℤ16 -> ℤ16
(+) = ℤ16 -> ℤ16 -> ℤ16
forall a. Num a => a -> a -> a
(HS.+)
instance Minus ℤ16 where (-) = ℤ16 -> ℤ16 -> ℤ16
forall a. Num a => a -> a -> a
(HS.-)
instance One ℤ16 where one :: ℤ16
one = ℕ -> ℤ16
𝕫16 ℕ
1
instance Times ℤ16 where × :: ℤ16 -> ℤ16 -> ℤ16
(×) = ℤ16 -> ℤ16 -> ℤ16
forall a. Num a => a -> a -> a
(HS.*)
instance DivMod ℤ16 where ⌿ :: ℤ16 -> ℤ16 -> ℤ16
(⌿) = ℤ16 -> ℤ16 -> ℤ16
forall a. Integral a => a -> a -> a
HS.div ; ÷ :: ℤ16 -> ℤ16 -> ℤ16
(÷) = ℤ16 -> ℤ16 -> ℤ16
forall a. Integral a => a -> a -> a
HS.mod
instance Pon ℤ16 where ^^ :: ℤ16 -> ℕ -> ℤ16
(^^) = ℤ16 -> ℕ -> ℤ16
forall a b. (Num a, Integral b) => a -> b -> a
(HS.^)
instance Bot ℤ16 where bot :: ℤ16
bot = ℤ16
forall a. Bounded a => a
HS.minBound
instance Join ℤ16 where ⊔ :: ℤ16 -> ℤ16 -> ℤ16
(⊔) = ℤ16 -> ℤ16 -> ℤ16
forall a. Ord a => a -> a -> a
(⩏)
instance Top ℤ16 where top :: ℤ16
top = ℤ16
forall a. Bounded a => a
HS.maxBound
instance Meet ℤ16 where ⊓ :: ℤ16 -> ℤ16 -> ℤ16
(⊓) = ℤ16 -> ℤ16 -> ℤ16
forall a. Ord a => a -> a -> a
(⩎)
instance Null ℤ16 where null :: ℤ16
null = ℤ16
forall a. Zero a => a
zero
instance Append ℤ16 where ⧺ :: ℤ16 -> ℤ16 -> ℤ16
(⧺) = ℤ16 -> ℤ16 -> ℤ16
forall a. Plus a => a -> a -> a
(+)
instance Additive ℤ16
instance Multiplicative ℤ16
instance JoinLattice ℤ16
instance MeetLattice ℤ16
instance Monoid ℤ16
instance ToNatO ℤ16 where
natO :: ℤ16 -> 𝑂 ℕ
natO ℤ16
i
| ℤ16
i ℤ16 -> ℤ16 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ16
𝕫16 ℕ
0 = 𝑂 ℕ
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ -> 𝑂 ℕ
forall a. a -> 𝑂 a
Some (ℕ -> 𝑂 ℕ) -> ℕ -> 𝑂 ℕ
forall a b. (a -> b) -> a -> b
$ ℤ16 -> ℕ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ16
i
instance ToNatO64 ℤ16 where
natO64 :: ℤ16 -> 𝑂 ℕ64
natO64 ℤ16
i
| ℤ16
i ℤ16 -> ℤ16 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ16
𝕫16 ℕ
0 = 𝑂 ℕ64
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ64 -> 𝑂 ℕ64
forall a. a -> 𝑂 a
Some (ℕ64 -> 𝑂 ℕ64) -> ℕ64 -> 𝑂 ℕ64
forall a b. (a -> b) -> a -> b
$ ℤ16 -> ℕ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ16
i
instance ToNatO32 ℤ16 where
natO32 :: ℤ16 -> 𝑂 ℕ32
natO32 ℤ16
i
| ℤ16
i ℤ16 -> ℤ16 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ16
𝕫16 ℕ
0 = 𝑂 ℕ32
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ32 -> 𝑂 ℕ32
forall a. a -> 𝑂 a
Some (ℕ32 -> 𝑂 ℕ32) -> ℕ32 -> 𝑂 ℕ32
forall a b. (a -> b) -> a -> b
$ ℤ16 -> ℕ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ16
i
instance ToNatO16 ℤ16 where
natO16 :: ℤ16 -> 𝑂 ℕ16
natO16 ℤ16
i
| ℤ16
i ℤ16 -> ℤ16 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ16
𝕫16 ℕ
0 = 𝑂 ℕ16
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ16 -> 𝑂 ℕ16
forall a. a -> 𝑂 a
Some (ℕ16 -> 𝑂 ℕ16) -> ℕ16 -> 𝑂 ℕ16
forall a b. (a -> b) -> a -> b
$ ℤ16 -> ℕ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ16
i
instance ToNatO8 ℤ16 where
natO8 :: ℤ16 -> 𝑂 ℕ8
natO8 ℤ16
i
| ℤ16
i ℤ16 -> ℤ16 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ16
𝕫16 ℕ
0 = 𝑂 ℕ8
forall a. 𝑂 a
None
| ℤ16
i ℤ16 -> ℤ16 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℕ8 -> ℤ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℕ8) = 𝑂 ℕ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ8 -> 𝑂 ℕ8
forall a. a -> 𝑂 a
Some (ℕ8 -> 𝑂 ℕ8) -> ℕ8 -> 𝑂 ℕ8
forall a b. (a -> b) -> a -> b
$ ℤ16 -> ℕ8
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ16
i
instance ToInt ℤ16 where int :: ℤ16 -> ℤ
int = ℤ16 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToInt64 ℤ16 where int64 :: ℤ16 -> ℤ64
int64 = ℤ16 -> ℤ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToInt32 ℤ16 where int32 :: ℤ16 -> ℤ32
int32 = ℤ16 -> ℤ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToInt16 ℤ16 where int16 :: ℤ16 -> ℤ16
int16 = ℤ16 -> ℤ16
forall a. a -> a
id
instance ToIntO8 ℤ16 where
intO8 :: ℤ16 -> 𝑂 ℤ8
intO8 ℤ16
i
| ℤ16
i ℤ16 -> ℤ16 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℤ8 -> ℤ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.minBound @ℤ8) = 𝑂 ℤ8
forall a. 𝑂 a
None
| ℤ16
i ℤ16 -> ℤ16 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
> ℤ8 -> ℤ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral (forall a. Bounded a => a
HS.maxBound @ℤ8) = 𝑂 ℤ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ8 -> 𝑂 ℤ8
forall a. a -> 𝑂 a
Some (ℤ8 -> 𝑂 ℤ8) -> ℤ8 -> 𝑂 ℤ8
forall a b. (a -> b) -> a -> b
$ ℤ16 -> ℤ8
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ16
i
instance ToRational ℤ16 where rat :: ℤ16 -> ℚ
rat = ℤ16 -> ℚ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToRationalᴾO ℤ16 where
ratᴾO :: ℤ16 -> 𝑂 ℚᴾ
ratᴾO ℤ16
i
| ℤ16
i ℤ16 -> ℤ16 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ16
𝕫16 ℕ
0 = 𝑂 ℚᴾ
forall a. 𝑂 a
None
| 𝔹
otherwise = ℚᴾ -> 𝑂 ℚᴾ
forall a. a -> 𝑂 a
Some (ℚᴾ -> 𝑂 ℚᴾ) -> ℚᴾ -> 𝑂 ℚᴾ
forall a b. (a -> b) -> a -> b
$ ℤ16 -> ℚᴾ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ16
i
instance ToDouble ℤ16 where dbl :: ℤ16 -> 𝔻
dbl = ℤ16 -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToDoubleᴾO ℤ16 where
dblᴾO :: ℤ16 -> 𝑂 𝔻ᴾ
dblᴾO ℤ16
i
| ℤ16
i ℤ16 -> ℤ16 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ16
𝕫16 ℕ
0 = 𝑂 𝔻ᴾ
forall a. 𝑂 a
None
| 𝔹
otherwise = 𝔻ᴾ -> 𝑂 𝔻ᴾ
forall a. a -> 𝑂 a
Some (𝔻ᴾ -> 𝑂 𝔻ᴾ) -> 𝔻ᴾ -> 𝑂 𝔻ᴾ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻ᴾ
𝔻ᴾ (𝔻 -> 𝔻ᴾ) -> 𝔻 -> 𝔻ᴾ
forall a b. (a -> b) -> a -> b
$ ℤ16 -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ16
i
instance ToNumber ℤ16 where num :: ℤ16 -> ℝ
num = ℤ -> ℝ
Integer (ℤ -> ℝ) -> (ℤ16 -> ℤ) -> ℤ16 -> ℝ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℤ16 -> ℤ
forall a. ToInt a => a -> ℤ
int
instance ToNumberᴾO ℤ16 where
numᴾO :: ℤ16 -> 𝑂 ℝᴾ
numᴾO ℤ16
i = case ℤ16 -> 𝑂 ℕ
forall a. ToNatO a => a -> 𝑂 ℕ
natO ℤ16
i of
𝑂 ℕ
None → 𝑂 ℝᴾ
forall a. 𝑂 a
None
Some ℕ
n → ℝᴾ -> 𝑂 ℝᴾ
forall a. a -> 𝑂 a
Some (ℝᴾ -> 𝑂 ℝᴾ) -> ℝᴾ -> 𝑂 ℝᴾ
forall a b. (a -> b) -> a -> b
$ ℕ -> ℝᴾ
Natural ℕ
n
instance Zero ℤ8 where zero :: ℤ8
zero = ℕ -> ℤ8
𝕫8 ℕ
0
instance Plus ℤ8 where + :: ℤ8 -> ℤ8 -> ℤ8
(+) = ℤ8 -> ℤ8 -> ℤ8
forall a. Num a => a -> a -> a
(HS.+)
instance Minus ℤ8 where (-) = ℤ8 -> ℤ8 -> ℤ8
forall a. Num a => a -> a -> a
(HS.-)
instance One ℤ8 where one :: ℤ8
one = ℕ -> ℤ8
𝕫8 ℕ
1
instance Times ℤ8 where × :: ℤ8 -> ℤ8 -> ℤ8
(×) = ℤ8 -> ℤ8 -> ℤ8
forall a. Num a => a -> a -> a
(HS.*)
instance DivMod ℤ8 where ⌿ :: ℤ8 -> ℤ8 -> ℤ8
(⌿) = ℤ8 -> ℤ8 -> ℤ8
forall a. Integral a => a -> a -> a
HS.div ; ÷ :: ℤ8 -> ℤ8 -> ℤ8
(÷) = ℤ8 -> ℤ8 -> ℤ8
forall a. Integral a => a -> a -> a
HS.mod
instance Pon ℤ8 where ^^ :: ℤ8 -> ℕ -> ℤ8
(^^) = ℤ8 -> ℕ -> ℤ8
forall a b. (Num a, Integral b) => a -> b -> a
(HS.^)
instance Bot ℤ8 where bot :: ℤ8
bot = ℤ8
forall a. Bounded a => a
HS.minBound
instance Join ℤ8 where ⊔ :: ℤ8 -> ℤ8 -> ℤ8
(⊔) = ℤ8 -> ℤ8 -> ℤ8
forall a. Ord a => a -> a -> a
(⩏)
instance Top ℤ8 where top :: ℤ8
top = ℤ8
forall a. Bounded a => a
HS.maxBound
instance Meet ℤ8 where ⊓ :: ℤ8 -> ℤ8 -> ℤ8
(⊓) = ℤ8 -> ℤ8 -> ℤ8
forall a. Ord a => a -> a -> a
(⩎)
instance Null ℤ8 where null :: ℤ8
null = ℤ8
forall a. Zero a => a
zero
instance Append ℤ8 where ⧺ :: ℤ8 -> ℤ8 -> ℤ8
(⧺) = ℤ8 -> ℤ8 -> ℤ8
forall a. Plus a => a -> a -> a
(+)
instance Additive ℤ8
instance Multiplicative ℤ8
instance JoinLattice ℤ8
instance MeetLattice ℤ8
instance Monoid ℤ8
instance ToNatO ℤ8 where
natO :: ℤ8 -> 𝑂 ℕ
natO ℤ8
i
| ℤ8
i ℤ8 -> ℤ8 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ8
𝕫8 ℕ
0 = 𝑂 ℕ
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ -> 𝑂 ℕ
forall a. a -> 𝑂 a
Some (ℕ -> 𝑂 ℕ) -> ℕ -> 𝑂 ℕ
forall a b. (a -> b) -> a -> b
$ ℤ8 -> ℕ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ8
i
instance ToNatO64 ℤ8 where
natO64 :: ℤ8 -> 𝑂 ℕ64
natO64 ℤ8
i
| ℤ8
i ℤ8 -> ℤ8 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ8
𝕫8 ℕ
0 = 𝑂 ℕ64
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ64 -> 𝑂 ℕ64
forall a. a -> 𝑂 a
Some (ℕ64 -> 𝑂 ℕ64) -> ℕ64 -> 𝑂 ℕ64
forall a b. (a -> b) -> a -> b
$ ℤ8 -> ℕ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ8
i
instance ToNatO32 ℤ8 where
natO32 :: ℤ8 -> 𝑂 ℕ32
natO32 ℤ8
i
| ℤ8
i ℤ8 -> ℤ8 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ8
𝕫8 ℕ
0 = 𝑂 ℕ32
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ32 -> 𝑂 ℕ32
forall a. a -> 𝑂 a
Some (ℕ32 -> 𝑂 ℕ32) -> ℕ32 -> 𝑂 ℕ32
forall a b. (a -> b) -> a -> b
$ ℤ8 -> ℕ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ8
i
instance ToNatO16 ℤ8 where
natO16 :: ℤ8 -> 𝑂 ℕ16
natO16 ℤ8
i
| ℤ8
i ℤ8 -> ℤ8 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ8
𝕫8 ℕ
0 = 𝑂 ℕ16
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ16 -> 𝑂 ℕ16
forall a. a -> 𝑂 a
Some (ℕ16 -> 𝑂 ℕ16) -> ℕ16 -> 𝑂 ℕ16
forall a b. (a -> b) -> a -> b
$ ℤ8 -> ℕ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ8
i
instance ToNatO8 ℤ8 where
natO8 :: ℤ8 -> 𝑂 ℕ8
natO8 ℤ8
i
| ℤ8
i ℤ8 -> ℤ8 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ8
𝕫8 ℕ
0 = 𝑂 ℕ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ8 -> 𝑂 ℕ8
forall a. a -> 𝑂 a
Some (ℕ8 -> 𝑂 ℕ8) -> ℕ8 -> 𝑂 ℕ8
forall a b. (a -> b) -> a -> b
$ ℤ8 -> ℕ8
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ8
i
instance ToInt ℤ8 where int :: ℤ8 -> ℤ
int = ℤ8 -> ℤ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToInt64 ℤ8 where int64 :: ℤ8 -> ℤ64
int64 = ℤ8 -> ℤ64
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToInt32 ℤ8 where int32 :: ℤ8 -> ℤ32
int32 = ℤ8 -> ℤ32
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToInt16 ℤ8 where int16 :: ℤ8 -> ℤ16
int16 = ℤ8 -> ℤ16
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToInt8 ℤ8 where int8 :: ℤ8 -> ℤ8
int8 = ℤ8 -> ℤ8
forall a. a -> a
id
instance ToRational ℤ8 where rat :: ℤ8 -> ℚ
rat = ℤ8 -> ℚ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToRationalᴾO ℤ8 where
ratᴾO :: ℤ8 -> 𝑂 ℚᴾ
ratᴾO ℤ8
i
| ℤ8
i ℤ8 -> ℤ8 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ8
𝕫8 ℕ
0 = 𝑂 ℚᴾ
forall a. 𝑂 a
None
| 𝔹
otherwise = ℚᴾ -> 𝑂 ℚᴾ
forall a. a -> 𝑂 a
Some (ℚᴾ -> 𝑂 ℚᴾ) -> ℚᴾ -> 𝑂 ℚᴾ
forall a b. (a -> b) -> a -> b
$ ℤ8 -> ℚᴾ
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ8
i
instance ToDouble ℤ8 where dbl :: ℤ8 -> 𝔻
dbl = ℤ8 -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral
instance ToDoubleᴾO ℤ8 where
dblᴾO :: ℤ8 -> 𝑂 𝔻ᴾ
dblᴾO ℤ8
i
| ℤ8
i ℤ8 -> ℤ8 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ8
𝕫8 ℕ
0 = 𝑂 𝔻ᴾ
forall a. 𝑂 a
None
| 𝔹
otherwise = 𝔻ᴾ -> 𝑂 𝔻ᴾ
forall a. a -> 𝑂 a
Some (𝔻ᴾ -> 𝑂 𝔻ᴾ) -> 𝔻ᴾ -> 𝑂 𝔻ᴾ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻ᴾ
𝔻ᴾ (𝔻 -> 𝔻ᴾ) -> 𝔻 -> 𝔻ᴾ
forall a b. (a -> b) -> a -> b
$ ℤ8 -> 𝔻
forall a b. (Integral a, Num b) => a -> b
HS.fromIntegral ℤ8
i
instance ToNumber ℤ8 where num :: ℤ8 -> ℝ
num = ℤ -> ℝ
Integer (ℤ -> ℝ) -> (ℤ8 -> ℤ) -> ℤ8 -> ℝ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℤ8 -> ℤ
forall a. ToInt a => a -> ℤ
int
instance ToNumberᴾO ℤ8 where
numᴾO :: ℤ8 -> 𝑂 ℝᴾ
numᴾO ℤ8
i = case ℤ8 -> 𝑂 ℕ
forall a. ToNatO a => a -> 𝑂 ℕ
natO ℤ8
i of
𝑂 ℕ
None → 𝑂 ℝᴾ
forall a. 𝑂 a
None
Some ℕ
n → ℝᴾ -> 𝑂 ℝᴾ
forall a. a -> 𝑂 a
Some (ℝᴾ -> 𝑂 ℝᴾ) -> ℝᴾ -> 𝑂 ℝᴾ
forall a b. (a -> b) -> a -> b
$ ℕ -> ℝᴾ
Natural ℕ
n
instance Zero ℚ where zero :: ℚ
zero = ℕ -> ℚ
𝕢 ℕ
0
instance Plus ℚ where + :: ℚ -> ℚ -> ℚ
(+) = ℚ -> ℚ -> ℚ
forall a. Num a => a -> a -> a
(HS.+)
instance Minus ℚ where (-) = ℚ -> ℚ -> ℚ
forall a. Num a => a -> a -> a
(HS.-)
instance One ℚ where one :: ℚ
one = ℕ -> ℚ
𝕢 ℕ
1
instance Times ℚ where × :: ℚ -> ℚ -> ℚ
(×) = ℚ -> ℚ -> ℚ
forall a. Num a => a -> a -> a
(HS.*)
instance Divide ℚ where / :: ℚ -> ℚ -> ℚ
(/) = ℚ -> ℚ -> ℚ
forall a. Fractional a => a -> a -> a
(HS./)
instance Pon ℚ where ^^ :: ℚ -> ℕ -> ℚ
(^^) = ℚ -> ℕ -> ℚ
forall a b. (Num a, Integral b) => a -> b -> a
(HS.^)
instance Bot ℚ where bot :: ℚ
bot = ℕ -> ℚ
𝕢 ℕ
0
instance Join ℚ where ⊔ :: ℚ -> ℚ -> ℚ
(⊔) = ℚ -> ℚ -> ℚ
forall a. Ord a => a -> a -> a
(⩏)
instance Meet ℚ where ⊓ :: ℚ -> ℚ -> ℚ
(⊓) = ℚ -> ℚ -> ℚ
forall a. Ord a => a -> a -> a
(⩎)
instance Null ℚ where null :: ℚ
null = ℚ
forall a. Zero a => a
zero
instance Append ℚ where ⧺ :: ℚ -> ℚ -> ℚ
(⧺) = ℚ -> ℚ -> ℚ
forall a. Plus a => a -> a -> a
(+)
instance Additive ℚ
instance Multiplicative ℚ
instance JoinLattice ℚ
instance Monoid ℚ
instance ToNatO ℚ where
natO :: ℚ -> 𝑂 ℕ
natO ℚ
q
| ℚ -> ℕ
denom ℚ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℕ
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ -> 𝑂 ℕ
forall a. ToNatO a => a -> 𝑂 ℕ
natO (ℤ -> 𝑂 ℕ) -> ℤ -> 𝑂 ℕ
forall a b. (a -> b) -> a -> b
$ ℚ -> ℤ
numer ℚ
q
instance ToNatO64 ℚ where
natO64 :: ℚ -> 𝑂 ℕ64
natO64 ℚ
q
| ℚ -> ℕ
denom ℚ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℕ64
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ -> 𝑂 ℕ64
forall a. ToNatO64 a => a -> 𝑂 ℕ64
natO64 (ℤ -> 𝑂 ℕ64) -> ℤ -> 𝑂 ℕ64
forall a b. (a -> b) -> a -> b
$ ℚ -> ℤ
numer ℚ
q
instance ToNatO32 ℚ where
natO32 :: ℚ -> 𝑂 ℕ32
natO32 ℚ
q
| ℚ -> ℕ
denom ℚ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℕ32
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ -> 𝑂 ℕ32
forall a. ToNatO32 a => a -> 𝑂 ℕ32
natO32 (ℤ -> 𝑂 ℕ32) -> ℤ -> 𝑂 ℕ32
forall a b. (a -> b) -> a -> b
$ ℚ -> ℤ
numer ℚ
q
instance ToNatO16 ℚ where
natO16 :: ℚ -> 𝑂 ℕ16
natO16 ℚ
q
| ℚ -> ℕ
denom ℚ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℕ16
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ -> 𝑂 ℕ16
forall a. ToNatO16 a => a -> 𝑂 ℕ16
natO16 (ℤ -> 𝑂 ℕ16) -> ℤ -> 𝑂 ℕ16
forall a b. (a -> b) -> a -> b
$ ℚ -> ℤ
numer ℚ
q
instance ToNatO8 ℚ where
natO8 :: ℚ -> 𝑂 ℕ8
natO8 ℚ
q
| ℚ -> ℕ
denom ℚ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℕ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ -> 𝑂 ℕ8
forall a. ToNatO8 a => a -> 𝑂 ℕ8
natO8 (ℤ -> 𝑂 ℕ8) -> ℤ -> 𝑂 ℕ8
forall a b. (a -> b) -> a -> b
$ ℚ -> ℤ
numer ℚ
q
instance ToIntO ℚ where
intO :: ℚ -> 𝑂 ℤ
intO ℚ
q
| ℚ -> ℕ
denom ℚ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℤ
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ -> 𝑂 ℤ
forall a. a -> 𝑂 a
Some (ℤ -> 𝑂 ℤ) -> ℤ -> 𝑂 ℤ
forall a b. (a -> b) -> a -> b
$ ℚ -> ℤ
numer ℚ
q
instance ToIntO64 ℚ where
intO64 :: ℚ -> 𝑂 ℤ64
intO64 ℚ
q
| ℚ -> ℕ
denom ℚ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℤ64
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ -> 𝑂 ℤ64
forall a. ToIntO64 a => a -> 𝑂 ℤ64
intO64 (ℤ -> 𝑂 ℤ64) -> ℤ -> 𝑂 ℤ64
forall a b. (a -> b) -> a -> b
$ ℚ -> ℤ
numer ℚ
q
instance ToIntO32 ℚ where
intO32 :: ℚ -> 𝑂 ℤ32
intO32 ℚ
q
| ℚ -> ℕ
denom ℚ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℤ32
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ -> 𝑂 ℤ32
forall a. ToIntO32 a => a -> 𝑂 ℤ32
intO32 (ℤ -> 𝑂 ℤ32) -> ℤ -> 𝑂 ℤ32
forall a b. (a -> b) -> a -> b
$ ℚ -> ℤ
numer ℚ
q
instance ToIntO16 ℚ where
intO16 :: ℚ -> 𝑂 ℤ16
intO16 ℚ
q
| ℚ -> ℕ
denom ℚ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℤ16
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ -> 𝑂 ℤ16
forall a. ToIntO16 a => a -> 𝑂 ℤ16
intO16 (ℤ -> 𝑂 ℤ16) -> ℤ -> 𝑂 ℤ16
forall a b. (a -> b) -> a -> b
$ ℚ -> ℤ
numer ℚ
q
instance ToIntO8 ℚ where
intO8 :: ℚ -> 𝑂 ℤ8
intO8 ℚ
q
| ℚ -> ℕ
denom ℚ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℤ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ -> 𝑂 ℤ8
forall a. ToIntO8 a => a -> 𝑂 ℤ8
intO8 (ℤ -> 𝑂 ℤ8) -> ℤ -> 𝑂 ℤ8
forall a b. (a -> b) -> a -> b
$ ℚ -> ℤ
numer ℚ
q
instance ToRational ℚ where rat :: ℚ -> ℚ
rat = ℚ -> ℚ
forall a. a -> a
id
instance ToRationalᴾO ℚ where
ratᴾO :: ℚ -> 𝑂 ℚᴾ
ratᴾO ℚ
q
| ℚ -> ℤ
numer ℚ
q ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ
𝕫 ℕ
0 = 𝑂 ℚᴾ
forall a. 𝑂 a
None
| 𝔹
otherwise = ℚᴾ -> 𝑂 ℚᴾ
forall a. a -> 𝑂 a
Some (ℚᴾ -> 𝑂 ℚᴾ) -> ℚᴾ -> 𝑂 ℚᴾ
forall a b. (a -> b) -> a -> b
$ ℚ -> ℚᴾ
forall a. Fractional a => ℚ -> a
HS.fromRational ℚ
q
instance ToDouble ℚ where dbl :: ℚ -> 𝔻
dbl = ℚ -> 𝔻
forall a. Fractional a => ℚ -> a
HS.fromRational
instance ToDoubleᴾO ℚ where
dblᴾO :: ℚ -> 𝑂 𝔻ᴾ
dblᴾO ℚ
q
| ℚ -> ℤ
numer ℚ
q ℤ -> ℤ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< ℕ -> ℤ
𝕫 ℕ
0 = 𝑂 𝔻ᴾ
forall a. 𝑂 a
None
| 𝔹
otherwise = 𝔻ᴾ -> 𝑂 𝔻ᴾ
forall a. a -> 𝑂 a
Some (𝔻ᴾ -> 𝑂 𝔻ᴾ) -> 𝔻ᴾ -> 𝑂 𝔻ᴾ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻ᴾ
𝔻ᴾ (𝔻 -> 𝔻ᴾ) -> 𝔻 -> 𝔻ᴾ
forall a b. (a -> b) -> a -> b
$ ℚ -> 𝔻
forall a. Fractional a => ℚ -> a
HS.fromRational ℚ
q
instance ToNumber ℚ where num :: ℚ -> ℝ
num = ℚ -> ℝ
Rational
instance ToNumberᴾO ℚ where
numᴾO :: ℚ -> 𝑂 ℝᴾ
numᴾO ℚ
q = case ℚ -> 𝑂 ℚᴾ
forall a. ToRationalᴾO a => a -> 𝑂 ℚᴾ
ratᴾO ℚ
q of
𝑂 ℚᴾ
None → 𝑂 ℝᴾ
forall a. 𝑂 a
None
Some ℚᴾ
qᴾ → ℝᴾ -> 𝑂 ℝᴾ
forall a. a -> 𝑂 a
Some (ℝᴾ -> 𝑂 ℝᴾ) -> ℝᴾ -> 𝑂 ℝᴾ
forall a b. (a -> b) -> a -> b
$ ℚᴾ -> ℝᴾ
Rationalᴾ ℚᴾ
qᴾ
instance Zero ℚᴾ where zero :: ℚᴾ
zero = ℕ -> ℚᴾ
𝕢ᴾ ℕ
0
instance Plus ℚᴾ where + :: ℚᴾ -> ℚᴾ -> ℚᴾ
(+) = ℚᴾ -> ℚᴾ -> ℚᴾ
forall a. Num a => a -> a -> a
(HS.+)
instance Minus ℚᴾ where (-) = ℚᴾ -> ℚᴾ -> ℚᴾ
forall a. Num a => a -> a -> a
(HS.-)
instance One ℚᴾ where one :: ℚᴾ
one = ℕ -> ℚᴾ
𝕢ᴾ ℕ
1
instance Times ℚᴾ where × :: ℚᴾ -> ℚᴾ -> ℚᴾ
(×) = ℚᴾ -> ℚᴾ -> ℚᴾ
forall a. Num a => a -> a -> a
(HS.*)
instance Divide ℚᴾ where / :: ℚᴾ -> ℚᴾ -> ℚᴾ
(/) = ℚᴾ -> ℚᴾ -> ℚᴾ
forall a. Fractional a => a -> a -> a
(HS./)
instance Pon ℚᴾ where ^^ :: ℚᴾ -> ℕ -> ℚᴾ
(^^) = ℚᴾ -> ℕ -> ℚᴾ
forall a b. (Num a, Integral b) => a -> b -> a
(HS.^)
instance Bot ℚᴾ where bot :: ℚᴾ
bot = ℕ -> ℚᴾ
𝕢ᴾ ℕ
0
instance Join ℚᴾ where ⊔ :: ℚᴾ -> ℚᴾ -> ℚᴾ
(⊔) = ℚᴾ -> ℚᴾ -> ℚᴾ
forall a. Ord a => a -> a -> a
(⩏)
instance Meet ℚᴾ where ⊓ :: ℚᴾ -> ℚᴾ -> ℚᴾ
(⊓) = ℚᴾ -> ℚᴾ -> ℚᴾ
forall a. Ord a => a -> a -> a
(⩎)
instance Null ℚᴾ where null :: ℚᴾ
null = ℚᴾ
forall a. Zero a => a
zero
instance Append ℚᴾ where ⧺ :: ℚᴾ -> ℚᴾ -> ℚᴾ
(⧺) = ℚᴾ -> ℚᴾ -> ℚᴾ
forall a. Plus a => a -> a -> a
(+)
instance Additive ℚᴾ
instance Multiplicative ℚᴾ
instance JoinLattice ℚᴾ
instance Monoid ℚᴾ
instance ToNatO ℚᴾ where
natO :: ℚᴾ -> 𝑂 ℕ
natO ℚᴾ
q
| ℚᴾ -> ℕ
denomᴾ ℚᴾ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℕ
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ -> 𝑂 ℕ
forall a. a -> 𝑂 a
Some (ℕ -> 𝑂 ℕ) -> ℕ -> 𝑂 ℕ
forall a b. (a -> b) -> a -> b
$ ℚᴾ -> ℕ
numerᴾ ℚᴾ
q
instance ToNatO64 ℚᴾ where
natO64 :: ℚᴾ -> 𝑂 ℕ64
natO64 ℚᴾ
q
| ℚᴾ -> ℕ
denomᴾ ℚᴾ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℕ64
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ -> 𝑂 ℕ64
forall a. ToNatO64 a => a -> 𝑂 ℕ64
natO64 (ℕ -> 𝑂 ℕ64) -> ℕ -> 𝑂 ℕ64
forall a b. (a -> b) -> a -> b
$ ℚᴾ -> ℕ
numerᴾ ℚᴾ
q
instance ToNatO32 ℚᴾ where
natO32 :: ℚᴾ -> 𝑂 ℕ32
natO32 ℚᴾ
q
| ℚᴾ -> ℕ
denomᴾ ℚᴾ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℕ32
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ -> 𝑂 ℕ32
forall a. ToNatO32 a => a -> 𝑂 ℕ32
natO32 (ℕ -> 𝑂 ℕ32) -> ℕ -> 𝑂 ℕ32
forall a b. (a -> b) -> a -> b
$ ℚᴾ -> ℕ
numerᴾ ℚᴾ
q
instance ToNatO16 ℚᴾ where
natO16 :: ℚᴾ -> 𝑂 ℕ16
natO16 ℚᴾ
q
| ℚᴾ -> ℕ
denomᴾ ℚᴾ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℕ16
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ -> 𝑂 ℕ16
forall a. ToNatO16 a => a -> 𝑂 ℕ16
natO16 (ℕ -> 𝑂 ℕ16) -> ℕ -> 𝑂 ℕ16
forall a b. (a -> b) -> a -> b
$ ℚᴾ -> ℕ
numerᴾ ℚᴾ
q
instance ToNatO8 ℚᴾ where
natO8 :: ℚᴾ -> 𝑂 ℕ8
natO8 ℚᴾ
q
| ℚᴾ -> ℕ
denomᴾ ℚᴾ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℕ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ -> 𝑂 ℕ8
forall a. ToNatO8 a => a -> 𝑂 ℕ8
natO8 (ℕ -> 𝑂 ℕ8) -> ℕ -> 𝑂 ℕ8
forall a b. (a -> b) -> a -> b
$ ℚᴾ -> ℕ
numerᴾ ℚᴾ
q
instance ToIntO ℚᴾ where
intO :: ℚᴾ -> 𝑂 ℤ
intO ℚᴾ
q
| ℚᴾ -> ℕ
denomᴾ ℚᴾ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℤ
forall a. 𝑂 a
None
| 𝔹
otherwise = ℤ -> 𝑂 ℤ
forall a. a -> 𝑂 a
Some (ℤ -> 𝑂 ℤ) -> ℤ -> 𝑂 ℤ
forall a b. (a -> b) -> a -> b
$ ℕ -> ℤ
forall a. ToInt a => a -> ℤ
int (ℕ -> ℤ) -> ℕ -> ℤ
forall a b. (a -> b) -> a -> b
$ ℚᴾ -> ℕ
numerᴾ ℚᴾ
q
instance ToIntO64 ℚᴾ where
intO64 :: ℚᴾ -> 𝑂 ℤ64
intO64 ℚᴾ
q
| ℚᴾ -> ℕ
denomᴾ ℚᴾ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℤ64
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ -> 𝑂 ℤ64
forall a. ToIntO64 a => a -> 𝑂 ℤ64
intO64 (ℕ -> 𝑂 ℤ64) -> ℕ -> 𝑂 ℤ64
forall a b. (a -> b) -> a -> b
$ ℚᴾ -> ℕ
numerᴾ ℚᴾ
q
instance ToIntO32 ℚᴾ where
intO32 :: ℚᴾ -> 𝑂 ℤ32
intO32 ℚᴾ
q
| ℚᴾ -> ℕ
denomᴾ ℚᴾ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℤ32
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ -> 𝑂 ℤ32
forall a. ToIntO32 a => a -> 𝑂 ℤ32
intO32 (ℕ -> 𝑂 ℤ32) -> ℕ -> 𝑂 ℤ32
forall a b. (a -> b) -> a -> b
$ ℚᴾ -> ℕ
numerᴾ ℚᴾ
q
instance ToIntO16 ℚᴾ where
intO16 :: ℚᴾ -> 𝑂 ℤ16
intO16 ℚᴾ
q
| ℚᴾ -> ℕ
denomᴾ ℚᴾ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℤ16
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ -> 𝑂 ℤ16
forall a. ToIntO16 a => a -> 𝑂 ℤ16
intO16 (ℕ -> 𝑂 ℤ16) -> ℕ -> 𝑂 ℤ16
forall a b. (a -> b) -> a -> b
$ ℚᴾ -> ℕ
numerᴾ ℚᴾ
q
instance ToIntO8 ℚᴾ where
intO8 :: ℚᴾ -> 𝑂 ℤ8
intO8 ℚᴾ
q
| ℚᴾ -> ℕ
denomᴾ ℚᴾ
q ℕ -> ℕ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≢ ℕ -> ℕ
𝕟 ℕ
1 = 𝑂 ℤ8
forall a. 𝑂 a
None
| 𝔹
otherwise = ℕ -> 𝑂 ℤ8
forall a. ToIntO8 a => a -> 𝑂 ℤ8
intO8 (ℕ -> 𝑂 ℤ8) -> ℕ -> 𝑂 ℤ8
forall a b. (a -> b) -> a -> b
$ ℚᴾ -> ℕ
numerᴾ ℚᴾ
q
instance ToRational ℚᴾ where rat :: ℚᴾ -> ℚ
rat = ℚᴾ -> ℚ
forall a. Real a => a -> ℚ
HS.toRational
instance ToRationalᴾ ℚᴾ where ratᴾ :: ℚᴾ -> ℚᴾ
ratᴾ = ℚᴾ -> ℚᴾ
forall a. a -> a
id
instance ToDouble ℚᴾ where dbl :: ℚᴾ -> 𝔻
dbl = ℚ -> 𝔻
forall a. Fractional a => ℚ -> a
HS.fromRational (ℚ -> 𝔻) -> (ℚᴾ -> ℚ) -> ℚᴾ -> 𝔻
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℚᴾ -> ℚ
forall a. ToRational a => a -> ℚ
rat
instance ToDoubleᴾ ℚᴾ where dblᴾ :: ℚᴾ -> 𝔻ᴾ
dblᴾ = 𝔻 -> 𝔻ᴾ
𝔻ᴾ (𝔻 -> 𝔻ᴾ) -> (ℚᴾ -> 𝔻) -> ℚᴾ -> 𝔻ᴾ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℚᴾ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl
instance ToNumber ℚᴾ where num :: ℚᴾ -> ℝ
num = ℚ -> ℝ
Rational (ℚ -> ℝ) -> (ℚᴾ -> ℚ) -> ℚᴾ -> ℝ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ ℚᴾ -> ℚ
forall a. ToRational a => a -> ℚ
rat
instance ToNumberᴾ ℚᴾ where numᴾ :: ℚᴾ -> ℝᴾ
numᴾ = ℚᴾ -> ℝᴾ
Rationalᴾ
instance Zero 𝔻 where zero :: 𝔻
zero = 𝔻
0.0
instance Plus 𝔻 where + :: 𝔻 -> 𝔻 -> 𝔻
(+) = 𝔻 -> 𝔻 -> 𝔻
forall a. Num a => a -> a -> a
(HS.+)
instance Minus 𝔻 where (-) = 𝔻 -> 𝔻 -> 𝔻
forall a. Num a => a -> a -> a
(HS.-)
instance One 𝔻 where one :: 𝔻
one = 𝔻
1.0
instance Times 𝔻 where × :: 𝔻 -> 𝔻 -> 𝔻
(×) = 𝔻 -> 𝔻 -> 𝔻
forall a. Num a => a -> a -> a
(HS.*)
instance Divide 𝔻 where / :: 𝔻 -> 𝔻 -> 𝔻
(/) = 𝔻 -> 𝔻 -> 𝔻
forall a. Fractional a => a -> a -> a
(HS./)
instance Pon 𝔻 where ^^ :: 𝔻 -> ℕ -> 𝔻
(^^) = 𝔻 -> ℕ -> 𝔻
forall a b. (Num a, Integral b) => a -> b -> a
(HS.^)
instance Pow 𝔻 where ^ :: 𝔻 -> 𝔻 -> 𝔻
(^) = 𝔻 -> 𝔻 -> 𝔻
forall a. Floating a => a -> a -> a
(HS.**)
instance Root 𝔻 where root :: 𝔻 -> 𝔻
root = 𝔻 -> 𝔻
forall a. Floating a => a -> a
HS.sqrt
instance Log 𝔻 where log :: 𝔻 -> 𝔻
log = 𝔻 -> 𝔻
forall a. Floating a => a -> a
HS.log
instance Efn 𝔻 where efn :: 𝔻 -> 𝔻
efn = 𝔻 -> 𝔻
forall a. Floating a => a -> a
HS.exp
instance Sin 𝔻 where sin :: 𝔻 -> 𝔻
sin = 𝔻 -> 𝔻
forall a. Floating a => a -> a
HS.sin
instance Cos 𝔻 where cos :: 𝔻 -> 𝔻
cos = 𝔻 -> 𝔻
forall a. Floating a => a -> a
HS.cos
instance Bot 𝔻 where bot :: 𝔻
bot = 𝔻 -> 𝔻
forall a. (Zero a, Minus a) => a -> a
neg 𝔻
1.0𝔻 -> 𝔻 -> 𝔻
forall a. Divide a => a -> a -> a
/𝔻
0.0
instance Join 𝔻 where ⊔ :: 𝔻 -> 𝔻 -> 𝔻
(⊔) = 𝔻 -> 𝔻 -> 𝔻
forall a. Ord a => a -> a -> a
(⩏)
instance Top 𝔻 where top :: 𝔻
top = 𝔻
1.0𝔻 -> 𝔻 -> 𝔻
forall a. Divide a => a -> a -> a
/𝔻
0.0
instance Meet 𝔻 where ⊓ :: 𝔻 -> 𝔻 -> 𝔻
(⊓) = 𝔻 -> 𝔻 -> 𝔻
forall a. Ord a => a -> a -> a
(⩎)
instance Null 𝔻 where null :: 𝔻
null = 𝔻
forall a. Zero a => a
zero
instance Append 𝔻 where ⧺ :: 𝔻 -> 𝔻 -> 𝔻
(⧺) = 𝔻 -> 𝔻 -> 𝔻
forall a. Plus a => a -> a -> a
(+)
instance Additive 𝔻
instance Multiplicative 𝔻
instance JoinLattice 𝔻
instance MeetLattice 𝔻
instance Monoid 𝔻
instance ToNatO 𝔻 where
natO :: 𝔻 -> 𝑂 ℕ
natO 𝔻
d =
let i :: ℤ
i = 𝔻 -> ℤ
truncate 𝔻
d
in case 𝔻
d 𝔻 -> 𝔻 -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i of
𝔹
True → ℤ -> 𝑂 ℕ
forall a. ToNatO a => a -> 𝑂 ℕ
natO ℤ
i
𝔹
False → 𝑂 ℕ
forall a. 𝑂 a
None
instance ToNatO64 𝔻 where
natO64 :: 𝔻 -> 𝑂 ℕ64
natO64 𝔻
d =
let i :: ℤ
i = 𝔻 -> ℤ
truncate 𝔻
d
in case 𝔻
d 𝔻 -> 𝔻 -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i of
𝔹
True → ℤ -> 𝑂 ℕ64
forall a. ToNatO64 a => a -> 𝑂 ℕ64
natO64 ℤ
i
𝔹
False → 𝑂 ℕ64
forall a. 𝑂 a
None
instance ToNatO32 𝔻 where
natO32 :: 𝔻 -> 𝑂 ℕ32
natO32 𝔻
d =
let i :: ℤ
i = 𝔻 -> ℤ
truncate 𝔻
d
in case 𝔻
d 𝔻 -> 𝔻 -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i of
𝔹
True → ℤ -> 𝑂 ℕ32
forall a. ToNatO32 a => a -> 𝑂 ℕ32
natO32 ℤ
i
𝔹
False → 𝑂 ℕ32
forall a. 𝑂 a
None
instance ToNatO16 𝔻 where
natO16 :: 𝔻 -> 𝑂 ℕ16
natO16 𝔻
d =
let i :: ℤ
i = 𝔻 -> ℤ
truncate 𝔻
d
in case 𝔻
d 𝔻 -> 𝔻 -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i of
𝔹
True → ℤ -> 𝑂 ℕ16
forall a. ToNatO16 a => a -> 𝑂 ℕ16
natO16 ℤ
i
𝔹
False → 𝑂 ℕ16
forall a. 𝑂 a
None
instance ToNatO8 𝔻 where
natO8 :: 𝔻 -> 𝑂 ℕ8
natO8 𝔻
d =
let i :: ℤ
i = 𝔻 -> ℤ
truncate 𝔻
d
in case 𝔻
d 𝔻 -> 𝔻 -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i of
𝔹
True → ℤ -> 𝑂 ℕ8
forall a. ToNatO8 a => a -> 𝑂 ℕ8
natO8 ℤ
i
𝔹
False → 𝑂 ℕ8
forall a. 𝑂 a
None
instance ToIntO 𝔻 where
intO :: 𝔻 -> 𝑂 ℤ
intO 𝔻
d =
let i :: ℤ
i = 𝔻 -> ℤ
truncate 𝔻
d
in case 𝔻
d 𝔻 -> 𝔻 -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i of
𝔹
True → ℤ -> 𝑂 ℤ
forall a. a -> 𝑂 a
Some ℤ
i
𝔹
False → 𝑂 ℤ
forall a. 𝑂 a
None
instance ToIntO64 𝔻 where
intO64 :: 𝔻 -> 𝑂 ℤ64
intO64 𝔻
d =
let i :: ℤ
i = 𝔻 -> ℤ
truncate 𝔻
d
in case 𝔻
d 𝔻 -> 𝔻 -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i of
𝔹
True → ℤ -> 𝑂 ℤ64
forall a. ToIntO64 a => a -> 𝑂 ℤ64
intO64 ℤ
i
𝔹
False → 𝑂 ℤ64
forall a. 𝑂 a
None
instance ToIntO32 𝔻 where
intO32 :: 𝔻 -> 𝑂 ℤ32
intO32 𝔻
d =
let i :: ℤ
i = 𝔻 -> ℤ
truncate 𝔻
d
in case 𝔻
d 𝔻 -> 𝔻 -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i of
𝔹
True → ℤ -> 𝑂 ℤ32
forall a. ToIntO32 a => a -> 𝑂 ℤ32
intO32 ℤ
i
𝔹
False → 𝑂 ℤ32
forall a. 𝑂 a
None
instance ToIntO16 𝔻 where
intO16 :: 𝔻 -> 𝑂 ℤ16
intO16 𝔻
d =
let i :: ℤ
i = 𝔻 -> ℤ
truncate 𝔻
d
in case 𝔻
d 𝔻 -> 𝔻 -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i of
𝔹
True → ℤ -> 𝑂 ℤ16
forall a. ToIntO16 a => a -> 𝑂 ℤ16
intO16 ℤ
i
𝔹
False → 𝑂 ℤ16
forall a. 𝑂 a
None
instance ToIntO8 𝔻 where
intO8 :: 𝔻 -> 𝑂 ℤ8
intO8 𝔻
d =
let i :: ℤ
i = 𝔻 -> ℤ
truncate 𝔻
d
in case 𝔻
d 𝔻 -> 𝔻 -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i of
𝔹
True → ℤ -> 𝑂 ℤ8
forall a. ToIntO8 a => a -> 𝑂 ℤ8
intO8 ℤ
i
𝔹
False → 𝑂 ℤ8
forall a. 𝑂 a
None
instance ToRational 𝔻 where rat :: 𝔻 -> ℚ
rat = 𝔻 -> ℚ
forall a b. (Real a, Fractional b) => a -> b
HS.realToFrac
instance ToRationalᴾO 𝔻 where
ratᴾO :: 𝔻 -> 𝑂 ℚᴾ
ratᴾO 𝔻
d
| 𝔻
d 𝔻 -> 𝔻 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< 𝔻
0.0 = 𝑂 ℚᴾ
forall a. 𝑂 a
None
| 𝔹
otherwise = ℚᴾ -> 𝑂 ℚᴾ
forall a. a -> 𝑂 a
Some (ℚᴾ -> 𝑂 ℚᴾ) -> ℚᴾ -> 𝑂 ℚᴾ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> ℚᴾ
forall a b. (Real a, Fractional b) => a -> b
HS.realToFrac 𝔻
d
instance ToDouble 𝔻 where dbl :: 𝔻 -> 𝔻
dbl = 𝔻 -> 𝔻
forall a. a -> a
id
instance ToDoubleᴾO 𝔻 where
dblᴾO :: 𝔻 -> 𝑂 𝔻ᴾ
dblᴾO 𝔻
d
| 𝔻
d 𝔻 -> 𝔻 -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< 𝔻
0.0 = 𝑂 𝔻ᴾ
forall a. 𝑂 a
None
| 𝔹
otherwise = 𝔻ᴾ -> 𝑂 𝔻ᴾ
forall a. a -> 𝑂 a
Some (𝔻ᴾ -> 𝑂 𝔻ᴾ) -> 𝔻ᴾ -> 𝑂 𝔻ᴾ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻ᴾ
𝔻ᴾ 𝔻
d
instance ToNumber 𝔻 where num :: 𝔻 -> ℝ
num = 𝔻 -> ℝ
Double
instance ToNumberᴾO 𝔻 where
numᴾO :: 𝔻 -> 𝑂 ℝᴾ
numᴾO 𝔻
d = case 𝔻 -> 𝑂 𝔻ᴾ
forall a. ToDoubleᴾO a => a -> 𝑂 𝔻ᴾ
dblᴾO 𝔻
d of
𝑂 𝔻ᴾ
None → 𝑂 ℝᴾ
forall a. 𝑂 a
None
Some 𝔻ᴾ
dᴾ → ℝᴾ -> 𝑂 ℝᴾ
forall a. a -> 𝑂 a
Some (ℝᴾ -> 𝑂 ℝᴾ) -> ℝᴾ -> 𝑂 ℝᴾ
forall a b. (a -> b) -> a -> b
$ 𝔻ᴾ -> ℝᴾ
Doubleᴾ 𝔻ᴾ
dᴾ
minus𝔻ᴾ ∷ 𝔻ᴾ → 𝔻ᴾ → 𝔻ᴾ
minus𝔻ᴾ :: 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
minus𝔻ᴾ 𝔻ᴾ
p₁ 𝔻ᴾ
p₂
| 𝔻ᴾ
p₁ 𝔻ᴾ -> 𝔻ᴾ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< 𝔻ᴾ
p₂ = 𝕊 -> 𝔻ᴾ
forall a. STACK => 𝕊 -> a
error 𝕊
"𝔻ᴾ: subtraction: LHS is smaller than RHS"
| 𝔹
otherwise = 𝔻ᴾ
p₁ 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
forall a. Num a => a -> a -> a
HS.- 𝔻ᴾ
p₂
instance Zero 𝔻ᴾ where zero :: 𝔻ᴾ
zero = 𝔻 -> 𝔻ᴾ
𝕕ᴾ 𝔻
0.0
instance Plus 𝔻ᴾ where + :: 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
(+) = 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
forall a. Num a => a -> a -> a
(HS.+)
instance Minus 𝔻ᴾ where (-) = 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
minus𝔻ᴾ
instance One 𝔻ᴾ where one :: 𝔻ᴾ
one = 𝔻 -> 𝔻ᴾ
𝕕ᴾ 𝔻
1.0
instance Times 𝔻ᴾ where × :: 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
(×) = 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
forall a. Num a => a -> a -> a
(HS.*)
instance Divide 𝔻ᴾ where / :: 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
(/) = 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
forall a. Fractional a => a -> a -> a
(HS./)
instance Pon 𝔻ᴾ where ^^ :: 𝔻ᴾ -> ℕ -> 𝔻ᴾ
(^^) = 𝔻ᴾ -> ℕ -> 𝔻ᴾ
forall a b. (Num a, Integral b) => a -> b -> a
(HS.^)
instance Pow 𝔻ᴾ where ^ :: 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
(^) = 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
forall a. Floating a => a -> a -> a
(HS.**)
instance Root 𝔻ᴾ where root :: 𝔻ᴾ -> 𝔻ᴾ
root = 𝔻ᴾ -> 𝔻ᴾ
forall a. Floating a => a -> a
HS.sqrt
instance Log 𝔻ᴾ where log :: 𝔻ᴾ -> 𝔻ᴾ
log = 𝔻ᴾ -> 𝔻ᴾ
forall a. Floating a => a -> a
HS.log
instance Efn 𝔻ᴾ where efn :: 𝔻ᴾ -> 𝔻ᴾ
efn = 𝔻ᴾ -> 𝔻ᴾ
forall a. Floating a => a -> a
HS.exp
instance Sin 𝔻ᴾ where sin :: 𝔻ᴾ -> 𝔻ᴾ
sin = 𝔻ᴾ -> 𝔻ᴾ
forall a. Floating a => a -> a
HS.sin
instance Cos 𝔻ᴾ where cos :: 𝔻ᴾ -> 𝔻ᴾ
cos = 𝔻ᴾ -> 𝔻ᴾ
forall a. Floating a => a -> a
HS.cos
instance Bot 𝔻ᴾ where bot :: 𝔻ᴾ
bot = 𝔻 -> 𝔻ᴾ
𝕕ᴾ 𝔻
0.0
instance Join 𝔻ᴾ where ⊔ :: 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
(⊔) = 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
forall a. Ord a => a -> a -> a
(⩏)
instance Top 𝔻ᴾ where top :: 𝔻ᴾ
top = 𝔻 -> 𝔻ᴾ
𝕕ᴾ 𝔻
1.0 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
forall a. Divide a => a -> a -> a
/ 𝔻 -> 𝔻ᴾ
𝕕ᴾ 𝔻
0.0
instance Meet 𝔻ᴾ where ⊓ :: 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
(⊓) = 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
forall a. Ord a => a -> a -> a
(⩎)
instance Null 𝔻ᴾ where null :: 𝔻ᴾ
null = 𝔻ᴾ
forall a. Zero a => a
zero
instance Append 𝔻ᴾ where ⧺ :: 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
(⧺) = 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
forall a. Plus a => a -> a -> a
(+)
instance Additive 𝔻ᴾ
instance Multiplicative 𝔻ᴾ
instance JoinLattice 𝔻ᴾ
instance MeetLattice 𝔻ᴾ
instance Monoid 𝔻ᴾ
instance ToNatO 𝔻ᴾ where
natO :: 𝔻ᴾ -> 𝑂 ℕ
natO 𝔻ᴾ
d =
let n :: ℕ
n = 𝔻ᴾ -> ℕ
truncateᴾ 𝔻ᴾ
d
in case 𝔻ᴾ
d 𝔻ᴾ -> 𝔻ᴾ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℕ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℕ
n of
𝔹
True → ℕ -> 𝑂 ℕ
forall a. a -> 𝑂 a
Some ℕ
n
𝔹
False → 𝑂 ℕ
forall a. 𝑂 a
None
instance ToNatO64 𝔻ᴾ where
natO64 :: 𝔻ᴾ -> 𝑂 ℕ64
natO64 𝔻ᴾ
d =
let n :: ℕ
n = 𝔻ᴾ -> ℕ
truncateᴾ 𝔻ᴾ
d
in case 𝔻ᴾ
d 𝔻ᴾ -> 𝔻ᴾ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℕ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℕ
n of
𝔹
True → ℕ -> 𝑂 ℕ64
forall a. ToNatO64 a => a -> 𝑂 ℕ64
natO64 ℕ
n
𝔹
False → 𝑂 ℕ64
forall a. 𝑂 a
None
instance ToNatO32 𝔻ᴾ where
natO32 :: 𝔻ᴾ -> 𝑂 ℕ32
natO32 𝔻ᴾ
d =
let n :: ℕ
n = 𝔻ᴾ -> ℕ
truncateᴾ 𝔻ᴾ
d
in case 𝔻ᴾ
d 𝔻ᴾ -> 𝔻ᴾ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℕ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℕ
n of
𝔹
True → ℕ -> 𝑂 ℕ32
forall a. ToNatO32 a => a -> 𝑂 ℕ32
natO32 ℕ
n
𝔹
False → 𝑂 ℕ32
forall a. 𝑂 a
None
instance ToNatO16 𝔻ᴾ where
natO16 :: 𝔻ᴾ -> 𝑂 ℕ16
natO16 𝔻ᴾ
d =
let n :: ℕ
n = 𝔻ᴾ -> ℕ
truncateᴾ 𝔻ᴾ
d
in case 𝔻ᴾ
d 𝔻ᴾ -> 𝔻ᴾ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℕ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℕ
n of
𝔹
True → ℕ -> 𝑂 ℕ16
forall a. ToNatO16 a => a -> 𝑂 ℕ16
natO16 ℕ
n
𝔹
False → 𝑂 ℕ16
forall a. 𝑂 a
None
instance ToNatO8 𝔻ᴾ where
natO8 :: 𝔻ᴾ -> 𝑂 ℕ8
natO8 𝔻ᴾ
d =
let n :: ℕ
n = 𝔻ᴾ -> ℕ
truncateᴾ 𝔻ᴾ
d
in case 𝔻ᴾ
d 𝔻ᴾ -> 𝔻ᴾ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℕ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℕ
n of
𝔹
True → ℕ -> 𝑂 ℕ8
forall a. ToNatO8 a => a -> 𝑂 ℕ8
natO8 ℕ
n
𝔹
False → 𝑂 ℕ8
forall a. 𝑂 a
None
instance ToIntO 𝔻ᴾ where
intO :: 𝔻ᴾ -> 𝑂 ℤ
intO 𝔻ᴾ
d =
let n :: ℕ
n = 𝔻ᴾ -> ℕ
truncateᴾ 𝔻ᴾ
d
in case 𝔻ᴾ
d 𝔻ᴾ -> 𝔻ᴾ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℕ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℕ
n of
𝔹
True → ℤ -> 𝑂 ℤ
forall a. a -> 𝑂 a
Some (ℤ -> 𝑂 ℤ) -> ℤ -> 𝑂 ℤ
forall a b. (a -> b) -> a -> b
$ ℕ -> ℤ
forall a. ToInt a => a -> ℤ
int ℕ
n
𝔹
False → 𝑂 ℤ
forall a. 𝑂 a
None
instance ToIntO64 𝔻ᴾ where
intO64 :: 𝔻ᴾ -> 𝑂 ℤ64
intO64 𝔻ᴾ
d =
let n :: ℕ
n = 𝔻ᴾ -> ℕ
truncateᴾ 𝔻ᴾ
d
in case 𝔻ᴾ
d 𝔻ᴾ -> 𝔻ᴾ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℕ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℕ
n of
𝔹
True → ℕ -> 𝑂 ℤ64
forall a. ToIntO64 a => a -> 𝑂 ℤ64
intO64 ℕ
n
𝔹
False → 𝑂 ℤ64
forall a. 𝑂 a
None
instance ToIntO32 𝔻ᴾ where
intO32 :: 𝔻ᴾ -> 𝑂 ℤ32
intO32 𝔻ᴾ
d =
let n :: ℕ
n = 𝔻ᴾ -> ℕ
truncateᴾ 𝔻ᴾ
d
in case 𝔻ᴾ
d 𝔻ᴾ -> 𝔻ᴾ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℕ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℕ
n of
𝔹
True → ℕ -> 𝑂 ℤ32
forall a. ToIntO32 a => a -> 𝑂 ℤ32
intO32 ℕ
n
𝔹
False → 𝑂 ℤ32
forall a. 𝑂 a
None
instance ToIntO16 𝔻ᴾ where
intO16 :: 𝔻ᴾ -> 𝑂 ℤ16
intO16 𝔻ᴾ
d =
let n :: ℕ
n = 𝔻ᴾ -> ℕ
truncateᴾ 𝔻ᴾ
d
in case 𝔻ᴾ
d 𝔻ᴾ -> 𝔻ᴾ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℕ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℕ
n of
𝔹
True → ℕ -> 𝑂 ℤ16
forall a. ToIntO16 a => a -> 𝑂 ℤ16
intO16 ℕ
n
𝔹
False → 𝑂 ℤ16
forall a. 𝑂 a
None
instance ToIntO8 𝔻ᴾ where
intO8 :: 𝔻ᴾ -> 𝑂 ℤ8
intO8 𝔻ᴾ
d =
let n :: ℕ
n = 𝔻ᴾ -> ℕ
truncateᴾ 𝔻ᴾ
d
in case 𝔻ᴾ
d 𝔻ᴾ -> 𝔻ᴾ -> 𝔹
forall a. Eq a => a -> a -> 𝔹
≡ ℕ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℕ
n of
𝔹
True → ℕ -> 𝑂 ℤ8
forall a. ToIntO8 a => a -> 𝑂 ℤ8
intO8 ℕ
n
𝔹
False → 𝑂 ℤ8
forall a. 𝑂 a
None
instance ToRational 𝔻ᴾ where rat :: 𝔻ᴾ -> ℚ
rat = 𝔻ᴾ -> ℚ
forall a. Real a => a -> ℚ
HS.toRational
instance ToRationalᴾO 𝔻ᴾ where
ratᴾO :: 𝔻ᴾ -> 𝑂 ℚᴾ
ratᴾO 𝔻ᴾ
d
| 𝔻ᴾ
d 𝔻ᴾ -> 𝔻ᴾ -> 𝔹
forall a. Ord a => a -> a -> 𝔹
< 𝔻 -> 𝔻ᴾ
𝕕ᴾ 𝔻
0.0 = 𝑂 ℚᴾ
forall a. 𝑂 a
None
| 𝔹
otherwise = ℚᴾ -> 𝑂 ℚᴾ
forall a. a -> 𝑂 a
Some (ℚᴾ -> 𝑂 ℚᴾ) -> ℚᴾ -> 𝑂 ℚᴾ
forall a b. (a -> b) -> a -> b
$ ℚ -> ℚᴾ
forall a. Fractional a => ℚ -> a
HS.fromRational (ℚ -> ℚᴾ) -> ℚ -> ℚᴾ
forall a b. (a -> b) -> a -> b
$ 𝔻ᴾ -> ℚ
forall a. Real a => a -> ℚ
HS.toRational 𝔻ᴾ
d
instance ToDouble 𝔻ᴾ where dbl :: 𝔻ᴾ -> 𝔻
dbl = 𝔻ᴾ -> 𝔻
un𝔻ᴾ
instance ToDoubleᴾ 𝔻ᴾ where dblᴾ :: 𝔻ᴾ -> 𝔻ᴾ
dblᴾ = 𝔻ᴾ -> 𝔻ᴾ
forall a. a -> a
id
instance ToNumber 𝔻ᴾ where num :: 𝔻ᴾ -> ℝ
num = 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> (𝔻ᴾ -> 𝔻) -> 𝔻ᴾ -> ℝ
forall b c a. (b -> c) -> (a -> b) -> a -> c
∘ 𝔻ᴾ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl
instance ToNumberᴾ 𝔻ᴾ where numᴾ :: 𝔻ᴾ -> ℝᴾ
numᴾ = 𝔻ᴾ -> ℝᴾ
Doubleᴾ
numberBOp ∷ (ℤ → ℤ → ℝ) → (ℚ → ℚ → ℝ) → (𝔻 → 𝔻 → ℝ) → ℝ → ℝ → ℝ
numberBOp :: (ℤ -> ℤ -> ℝ) -> (ℚ -> ℚ -> ℝ) -> (𝔻 -> 𝔻 -> ℝ) -> ℝ -> ℝ -> ℝ
numberBOp ℤ -> ℤ -> ℝ
oZ ℚ -> ℚ -> ℝ
_oQ 𝔻 -> 𝔻 -> ℝ
_oD (Integer ℤ
i₁) (Integer ℤ
i₂) = ℤ -> ℤ -> ℝ
oZ ℤ
i₁ ℤ
i₂
numberBOp ℤ -> ℤ -> ℝ
_oZ ℚ -> ℚ -> ℝ
oQ 𝔻 -> 𝔻 -> ℝ
_oD (Rational ℚ
q₁) (Rational ℚ
q₂) = ℚ -> ℚ -> ℝ
oQ ℚ
q₁ ℚ
q₂
numberBOp ℤ -> ℤ -> ℝ
_oZ ℚ -> ℚ -> ℝ
_oQ 𝔻 -> 𝔻 -> ℝ
oD (Double 𝔻
d₁) (Double 𝔻
d₂) = 𝔻 -> 𝔻 -> ℝ
oD 𝔻
d₁ 𝔻
d₂
numberBOp ℤ -> ℤ -> ℝ
_oZ ℚ -> ℚ -> ℝ
oQ 𝔻 -> 𝔻 -> ℝ
_oD (Integer ℤ
i₁) (Rational ℚ
q₂) = ℚ -> ℚ -> ℝ
oQ (ℤ -> ℚ
forall a. ToRational a => a -> ℚ
rat ℤ
i₁) ℚ
q₂
numberBOp ℤ -> ℤ -> ℝ
_oZ ℚ -> ℚ -> ℝ
oQ 𝔻 -> 𝔻 -> ℝ
_oD (Rational ℚ
q₁) (Integer ℤ
i₂) = ℚ -> ℚ -> ℝ
oQ ℚ
q₁ (ℤ -> ℚ
forall a. ToRational a => a -> ℚ
rat ℤ
i₂)
numberBOp ℤ -> ℤ -> ℝ
_oZ ℚ -> ℚ -> ℝ
_oQ 𝔻 -> 𝔻 -> ℝ
oD (Integer ℤ
i₁) (Double 𝔻
d₂) = 𝔻 -> 𝔻 -> ℝ
oD (ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i₁) 𝔻
d₂
numberBOp ℤ -> ℤ -> ℝ
_oZ ℚ -> ℚ -> ℝ
_oQ 𝔻 -> 𝔻 -> ℝ
oD (Double 𝔻
d₁) (Integer ℤ
i₂) = 𝔻 -> 𝔻 -> ℝ
oD 𝔻
d₁ (ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i₂)
numberBOp ℤ -> ℤ -> ℝ
_oZ ℚ -> ℚ -> ℝ
_oQ 𝔻 -> 𝔻 -> ℝ
oD (Rational ℚ
q₁) (Double 𝔻
d₂) = 𝔻 -> 𝔻 -> ℝ
oD (ℚ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℚ
q₁) 𝔻
d₂
numberBOp ℤ -> ℤ -> ℝ
_oZ ℚ -> ℚ -> ℝ
_oQ 𝔻 -> 𝔻 -> ℝ
oD (Double 𝔻
d₁) (Rational ℚ
q₂) = 𝔻 -> 𝔻 -> ℝ
oD 𝔻
d₁ (ℚ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℚ
q₂)
numberBOpᴾ ∷ (ℕ → ℕ → ℝᴾ) → (ℚᴾ → ℚᴾ → ℝᴾ) → (𝔻ᴾ → 𝔻ᴾ → ℝᴾ) → ℝᴾ → ℝᴾ → ℝᴾ
numberBOpᴾ :: (ℕ -> ℕ -> ℝᴾ)
-> (ℚᴾ -> ℚᴾ -> ℝᴾ) -> (𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ) -> ℝᴾ -> ℝᴾ -> ℝᴾ
numberBOpᴾ ℕ -> ℕ -> ℝᴾ
oZ ℚᴾ -> ℚᴾ -> ℝᴾ
_oQ 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
_oD (Natural ℕ
i₁) (Natural ℕ
i₂) = ℕ -> ℕ -> ℝᴾ
oZ ℕ
i₁ ℕ
i₂
numberBOpᴾ ℕ -> ℕ -> ℝᴾ
_oZ ℚᴾ -> ℚᴾ -> ℝᴾ
oQ 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
_oD (Rationalᴾ ℚᴾ
q₁) (Rationalᴾ ℚᴾ
q₂) = ℚᴾ -> ℚᴾ -> ℝᴾ
oQ ℚᴾ
q₁ ℚᴾ
q₂
numberBOpᴾ ℕ -> ℕ -> ℝᴾ
_oZ ℚᴾ -> ℚᴾ -> ℝᴾ
_oQ 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
oD (Doubleᴾ 𝔻ᴾ
d₁) (Doubleᴾ 𝔻ᴾ
d₂) = 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
oD 𝔻ᴾ
d₁ 𝔻ᴾ
d₂
numberBOpᴾ ℕ -> ℕ -> ℝᴾ
_oZ ℚᴾ -> ℚᴾ -> ℝᴾ
oQ 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
_oD (Natural ℕ
i₁) (Rationalᴾ ℚᴾ
q₂) = ℚᴾ -> ℚᴾ -> ℝᴾ
oQ (ℕ -> ℚᴾ
forall a. ToRationalᴾ a => a -> ℚᴾ
ratᴾ ℕ
i₁) ℚᴾ
q₂
numberBOpᴾ ℕ -> ℕ -> ℝᴾ
_oZ ℚᴾ -> ℚᴾ -> ℝᴾ
oQ 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
_oD (Rationalᴾ ℚᴾ
q₁) (Natural ℕ
i₂) = ℚᴾ -> ℚᴾ -> ℝᴾ
oQ ℚᴾ
q₁ (ℕ -> ℚᴾ
forall a. ToRationalᴾ a => a -> ℚᴾ
ratᴾ ℕ
i₂)
numberBOpᴾ ℕ -> ℕ -> ℝᴾ
_oZ ℚᴾ -> ℚᴾ -> ℝᴾ
_oQ 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
oD (Natural ℕ
i₁) (Doubleᴾ 𝔻ᴾ
d₂) = 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
oD (ℕ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℕ
i₁) 𝔻ᴾ
d₂
numberBOpᴾ ℕ -> ℕ -> ℝᴾ
_oZ ℚᴾ -> ℚᴾ -> ℝᴾ
_oQ 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
oD (Doubleᴾ 𝔻ᴾ
d₁) (Natural ℕ
i₂) = 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
oD 𝔻ᴾ
d₁ (ℕ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℕ
i₂)
numberBOpᴾ ℕ -> ℕ -> ℝᴾ
_oZ ℚᴾ -> ℚᴾ -> ℝᴾ
_oQ 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
oD (Rationalᴾ ℚᴾ
q₁) (Doubleᴾ 𝔻ᴾ
d₂) = 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
oD (ℚᴾ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℚᴾ
q₁) 𝔻ᴾ
d₂
numberBOpᴾ ℕ -> ℕ -> ℝᴾ
_oZ ℚᴾ -> ℚᴾ -> ℝᴾ
_oQ 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
oD (Doubleᴾ 𝔻ᴾ
d₁) (Rationalᴾ ℚᴾ
q₂) = 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
oD 𝔻ᴾ
d₁ (ℚᴾ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℚᴾ
q₂)
instance Zero ℝ where
zero :: ℝ
zero = ℤ -> ℝ
Integer ℤ
forall a. Zero a => a
zero
instance Plus ℝ where
+ :: ℝ -> ℝ -> ℝ
(+) = (ℤ -> ℤ -> ℝ) -> (ℚ -> ℚ -> ℝ) -> (𝔻 -> 𝔻 -> ℝ) -> ℝ -> ℝ -> ℝ
numberBOp (ℤ -> ℝ
Integer (ℤ -> ℝ) -> (ℤ -> ℤ -> ℤ) -> ℤ -> ℤ -> ℝ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ ℤ -> ℤ -> ℤ
forall a. Plus a => a -> a -> a
(+)) (ℚ -> ℝ
Rational (ℚ -> ℝ) -> (ℚ -> ℚ -> ℚ) -> ℚ -> ℚ -> ℝ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ ℚ -> ℚ -> ℚ
forall a. Plus a => a -> a -> a
(+)) ((𝔻 -> 𝔻 -> ℝ) -> ℝ -> ℝ -> ℝ) -> (𝔻 -> 𝔻 -> ℝ) -> ℝ -> ℝ -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> (𝔻 -> 𝔻 -> 𝔻) -> 𝔻 -> 𝔻 -> ℝ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ 𝔻 -> 𝔻 -> 𝔻
forall a. Plus a => a -> a -> a
(+)
instance Minus ℝ where
(-) = (ℤ -> ℤ -> ℝ) -> (ℚ -> ℚ -> ℝ) -> (𝔻 -> 𝔻 -> ℝ) -> ℝ -> ℝ -> ℝ
numberBOp (ℤ -> ℝ
Integer (ℤ -> ℝ) -> (ℤ -> ℤ -> ℤ) -> ℤ -> ℤ -> ℝ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ (-)) (ℚ -> ℝ
Rational (ℚ -> ℝ) -> (ℚ -> ℚ -> ℚ) -> ℚ -> ℚ -> ℝ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ (-)) ((𝔻 -> 𝔻 -> ℝ) -> ℝ -> ℝ -> ℝ) -> (𝔻 -> 𝔻 -> ℝ) -> ℝ -> ℝ -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> (𝔻 -> 𝔻 -> 𝔻) -> 𝔻 -> 𝔻 -> ℝ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ (-)
instance One ℝ where
one :: ℝ
one = ℤ -> ℝ
Integer ℤ
forall a. One a => a
one
instance Times ℝ where
× :: ℝ -> ℝ -> ℝ
(×) = (ℤ -> ℤ -> ℝ) -> (ℚ -> ℚ -> ℝ) -> (𝔻 -> 𝔻 -> ℝ) -> ℝ -> ℝ -> ℝ
numberBOp (ℤ -> ℝ
Integer (ℤ -> ℝ) -> (ℤ -> ℤ -> ℤ) -> ℤ -> ℤ -> ℝ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ ℤ -> ℤ -> ℤ
forall a. Times a => a -> a -> a
(×)) (ℚ -> ℝ
Rational (ℚ -> ℝ) -> (ℚ -> ℚ -> ℚ) -> ℚ -> ℚ -> ℝ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ ℚ -> ℚ -> ℚ
forall a. Times a => a -> a -> a
(×)) ((𝔻 -> 𝔻 -> ℝ) -> ℝ -> ℝ -> ℝ) -> (𝔻 -> 𝔻 -> ℝ) -> ℝ -> ℝ -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> (𝔻 -> 𝔻 -> 𝔻) -> 𝔻 -> 𝔻 -> ℝ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ 𝔻 -> 𝔻 -> 𝔻
forall a. Times a => a -> a -> a
(×)
instance Divide ℝ where
/ :: ℝ -> ℝ -> ℝ
(/) = (ℤ -> ℤ -> ℝ) -> (ℚ -> ℚ -> ℝ) -> (𝔻 -> 𝔻 -> ℝ) -> ℝ -> ℝ -> ℝ
numberBOp (\ ℤ
i₁ ℤ
i₂ → ℚ -> ℝ
Rational (ℚ -> ℝ) -> ℚ -> ℝ
forall a b. (a -> b) -> a -> b
$ ℤ -> ℚ
forall a. ToRational a => a -> ℚ
rat ℤ
i₁ ℚ -> ℚ -> ℚ
forall a. Divide a => a -> a -> a
/ ℤ -> ℚ
forall a. ToRational a => a -> ℚ
rat ℤ
i₂)
(ℚ -> ℝ
Rational (ℚ -> ℝ) -> (ℚ -> ℚ -> ℚ) -> ℚ -> ℚ -> ℝ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ ℚ -> ℚ -> ℚ
forall a. Divide a => a -> a -> a
(/))
((𝔻 -> 𝔻 -> ℝ) -> ℝ -> ℝ -> ℝ) -> (𝔻 -> 𝔻 -> ℝ) -> ℝ -> ℝ -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> (𝔻 -> 𝔻 -> 𝔻) -> 𝔻 -> 𝔻 -> ℝ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ 𝔻 -> 𝔻 -> 𝔻
forall a. Divide a => a -> a -> a
(/)
instance Pon ℝ where
Integer ℤ
m ^^ :: ℝ -> ℕ -> ℝ
^^ ℕ
n = ℤ -> ℝ
Integer (ℤ -> ℝ) -> ℤ -> ℝ
forall a b. (a -> b) -> a -> b
$ ℤ
m ℤ -> ℕ -> ℤ
forall a. Pon a => a -> ℕ -> a
^^ ℕ
n
Rational ℚ
q ^^ ℕ
n = ℚ -> ℝ
Rational (ℚ -> ℝ) -> ℚ -> ℝ
forall a b. (a -> b) -> a -> b
$ ℚ
q ℚ -> ℕ -> ℚ
forall a. Pon a => a -> ℕ -> a
^^ ℕ
n
Double 𝔻
d ^^ ℕ
n = 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> 𝔻 -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻
d 𝔻 -> ℕ -> 𝔻
forall a. Pon a => a -> ℕ -> a
^^ ℕ
n
instance Pow ℝ where
^ :: ℝ -> ℝ -> ℝ
(^) = (ℤ -> ℤ -> ℝ) -> (ℚ -> ℚ -> ℝ) -> (𝔻 -> 𝔻 -> ℝ) -> ℝ -> ℝ -> ℝ
numberBOp (\ ℤ
i₁ ℤ
i₂ → 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> 𝔻 -> ℝ
forall a b. (a -> b) -> a -> b
$ ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i₁ 𝔻 -> 𝔻 -> 𝔻
forall a. Pow a => a -> a -> a
^ ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i₂)
(\ ℚ
q₁ ℚ
q₂ → 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> 𝔻 -> ℝ
forall a b. (a -> b) -> a -> b
$ ℚ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℚ
q₁ 𝔻 -> 𝔻 -> 𝔻
forall a. Pow a => a -> a -> a
^ ℚ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℚ
q₂)
((𝔻 -> 𝔻 -> ℝ) -> ℝ -> ℝ -> ℝ) -> (𝔻 -> 𝔻 -> ℝ) -> ℝ -> ℝ -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> (𝔻 -> 𝔻 -> 𝔻) -> 𝔻 -> 𝔻 -> ℝ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ 𝔻 -> 𝔻 -> 𝔻
forall a. Pow a => a -> a -> a
(^)
instance Root ℝ where
root :: ℝ -> ℝ
root (Integer ℤ
i) = 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> 𝔻 -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻
forall a. Root a => a -> a
root (𝔻 -> 𝔻) -> 𝔻 -> 𝔻
forall a b. (a -> b) -> a -> b
$ ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i
root (Rational ℚ
q) = 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> 𝔻 -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻
forall a. Root a => a -> a
root (𝔻 -> 𝔻) -> 𝔻 -> 𝔻
forall a b. (a -> b) -> a -> b
$ ℚ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℚ
q
root (Double 𝔻
d) = 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> 𝔻 -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻
forall a. Root a => a -> a
root 𝔻
d
instance Log ℝ where
log :: ℝ -> ℝ
log (Integer ℤ
i) = 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> 𝔻 -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻
forall a. Log a => a -> a
log (𝔻 -> 𝔻) -> 𝔻 -> 𝔻
forall a b. (a -> b) -> a -> b
$ ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i
log (Rational ℚ
q) = 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> 𝔻 -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻
forall a. Log a => a -> a
log (𝔻 -> 𝔻) -> 𝔻 -> 𝔻
forall a b. (a -> b) -> a -> b
$ ℚ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℚ
q
log (Double 𝔻
d) = 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> 𝔻 -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻
forall a. Log a => a -> a
log 𝔻
d
instance Efn ℝ where
efn :: ℝ -> ℝ
efn (Integer ℤ
i) = 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> 𝔻 -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻
forall a. Efn a => a -> a
efn (𝔻 -> 𝔻) -> 𝔻 -> 𝔻
forall a b. (a -> b) -> a -> b
$ ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i
efn (Rational ℚ
q) = 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> 𝔻 -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻
forall a. Efn a => a -> a
efn (𝔻 -> 𝔻) -> 𝔻 -> 𝔻
forall a b. (a -> b) -> a -> b
$ ℚ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℚ
q
efn (Double 𝔻
d) = 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> 𝔻 -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻
forall a. Efn a => a -> a
efn 𝔻
d
instance Sin ℝ where
sin :: ℝ -> ℝ
sin (Integer ℤ
i) = 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> 𝔻 -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻
forall a. Sin a => a -> a
sin (𝔻 -> 𝔻) -> 𝔻 -> 𝔻
forall a b. (a -> b) -> a -> b
$ ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i
sin (Rational ℚ
q) = 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> 𝔻 -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻
forall a. Sin a => a -> a
sin (𝔻 -> 𝔻) -> 𝔻 -> 𝔻
forall a b. (a -> b) -> a -> b
$ ℚ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℚ
q
sin (Double 𝔻
d) = 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> 𝔻 -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻
forall a. Sin a => a -> a
sin 𝔻
d
instance Cos ℝ where
cos :: ℝ -> ℝ
cos (Integer ℤ
i) = 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> 𝔻 -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻
forall a. Cos a => a -> a
cos (𝔻 -> 𝔻) -> 𝔻 -> 𝔻
forall a b. (a -> b) -> a -> b
$ ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i
cos (Rational ℚ
q) = 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> 𝔻 -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻
forall a. Cos a => a -> a
cos (𝔻 -> 𝔻) -> 𝔻 -> 𝔻
forall a b. (a -> b) -> a -> b
$ ℚ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℚ
q
cos (Double 𝔻
d) = 𝔻 -> ℝ
Double (𝔻 -> ℝ) -> 𝔻 -> ℝ
forall a b. (a -> b) -> a -> b
$ 𝔻 -> 𝔻
forall a. Cos a => a -> a
cos 𝔻
d
instance Bot ℝ where bot :: ℝ
bot = ℝ
forall a. Zero a => a
zero
instance Join ℝ where ⊔ :: ℝ -> ℝ -> ℝ
(⊔) = (ℤ -> ℤ -> ℝ) -> (ℚ -> ℚ -> ℝ) -> (𝔻 -> 𝔻 -> ℝ) -> ℝ -> ℝ -> ℝ
numberBOp (ℤ -> ℝ
Integer (ℤ -> ℝ) -> (ℤ -> ℤ -> ℤ) -> ℤ -> ℤ -> ℝ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ ℤ -> ℤ -> ℤ
forall a. Join a => a -> a -> a
(⊔)) (ℚ -> ℝ
Rational (ℚ -> ℝ) -> (ℚ -> ℚ -> ℚ) -> ℚ -> ℚ -> ℝ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ ℚ -> ℚ -> ℚ
forall a. Join a => a -> a -> a
(⊔)) (𝔻 -> ℝ
Double (𝔻 -> ℝ) -> (𝔻 -> 𝔻 -> 𝔻) -> 𝔻 -> 𝔻 -> ℝ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ 𝔻 -> 𝔻 -> 𝔻
forall a. Join a => a -> a -> a
(⊔))
instance Meet ℝ where ⊓ :: ℝ -> ℝ -> ℝ
(⊓) = (ℤ -> ℤ -> ℝ) -> (ℚ -> ℚ -> ℝ) -> (𝔻 -> 𝔻 -> ℝ) -> ℝ -> ℝ -> ℝ
numberBOp (ℤ -> ℝ
Integer (ℤ -> ℝ) -> (ℤ -> ℤ -> ℤ) -> ℤ -> ℤ -> ℝ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ ℤ -> ℤ -> ℤ
forall a. Meet a => a -> a -> a
(⊓)) (ℚ -> ℝ
Rational (ℚ -> ℝ) -> (ℚ -> ℚ -> ℚ) -> ℚ -> ℚ -> ℝ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ ℚ -> ℚ -> ℚ
forall a. Meet a => a -> a -> a
(⊓)) (𝔻 -> ℝ
Double (𝔻 -> ℝ) -> (𝔻 -> 𝔻 -> 𝔻) -> 𝔻 -> 𝔻 -> ℝ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ 𝔻 -> 𝔻 -> 𝔻
forall a. Meet a => a -> a -> a
(⊓))
instance Null ℝ where null :: ℝ
null = ℝ
forall a. Zero a => a
zero
instance Append ℝ where ⧺ :: ℝ -> ℝ -> ℝ
(⧺) = ℝ -> ℝ -> ℝ
forall a. Plus a => a -> a -> a
(+)
instance Additive ℝ
instance Multiplicative ℝ
instance JoinLattice ℝ
instance Monoid ℝ
instance ToNatO ℝ where
natO :: ℝ -> 𝑂 ℕ
natO (Integer ℤ
i) = ℤ -> 𝑂 ℕ
forall a. ToNatO a => a -> 𝑂 ℕ
natO ℤ
i
natO (Rational ℚ
q) = ℚ -> 𝑂 ℕ
forall a. ToNatO a => a -> 𝑂 ℕ
natO ℚ
q
natO (Double 𝔻
d) = 𝔻 -> 𝑂 ℕ
forall a. ToNatO a => a -> 𝑂 ℕ
natO 𝔻
d
instance ToNatO64 ℝ where
natO64 :: ℝ -> 𝑂 ℕ64
natO64 (Integer ℤ
i) = ℤ -> 𝑂 ℕ64
forall a. ToNatO64 a => a -> 𝑂 ℕ64
natO64 ℤ
i
natO64 (Rational ℚ
q) = ℚ -> 𝑂 ℕ64
forall a. ToNatO64 a => a -> 𝑂 ℕ64
natO64 ℚ
q
natO64 (Double 𝔻
d) = 𝔻 -> 𝑂 ℕ64
forall a. ToNatO64 a => a -> 𝑂 ℕ64
natO64 𝔻
d
instance ToNatO32 ℝ where
natO32 :: ℝ -> 𝑂 ℕ32
natO32 (Integer ℤ
i) = ℤ -> 𝑂 ℕ32
forall a. ToNatO32 a => a -> 𝑂 ℕ32
natO32 ℤ
i
natO32 (Rational ℚ
q) = ℚ -> 𝑂 ℕ32
forall a. ToNatO32 a => a -> 𝑂 ℕ32
natO32 ℚ
q
natO32 (Double 𝔻
d) = 𝔻 -> 𝑂 ℕ32
forall a. ToNatO32 a => a -> 𝑂 ℕ32
natO32 𝔻
d
instance ToNatO16 ℝ where
natO16 :: ℝ -> 𝑂 ℕ16
natO16 (Integer ℤ
i) = ℤ -> 𝑂 ℕ16
forall a. ToNatO16 a => a -> 𝑂 ℕ16
natO16 ℤ
i
natO16 (Rational ℚ
q) = ℚ -> 𝑂 ℕ16
forall a. ToNatO16 a => a -> 𝑂 ℕ16
natO16 ℚ
q
natO16 (Double 𝔻
d) = 𝔻 -> 𝑂 ℕ16
forall a. ToNatO16 a => a -> 𝑂 ℕ16
natO16 𝔻
d
instance ToNatO8 ℝ where
natO8 :: ℝ -> 𝑂 ℕ8
natO8 (Integer ℤ
i) = ℤ -> 𝑂 ℕ8
forall a. ToNatO8 a => a -> 𝑂 ℕ8
natO8 ℤ
i
natO8 (Rational ℚ
q) = ℚ -> 𝑂 ℕ8
forall a. ToNatO8 a => a -> 𝑂 ℕ8
natO8 ℚ
q
natO8 (Double 𝔻
d) = 𝔻 -> 𝑂 ℕ8
forall a. ToNatO8 a => a -> 𝑂 ℕ8
natO8 𝔻
d
instance ToIntO ℝ where
intO :: ℝ -> 𝑂 ℤ
intO (Integer ℤ
i) = ℤ -> 𝑂 ℤ
forall a. a -> 𝑂 a
Some ℤ
i
intO (Rational ℚ
q) = ℚ -> 𝑂 ℤ
forall a. ToIntO a => a -> 𝑂 ℤ
intO ℚ
q
intO (Double 𝔻
d) = 𝔻 -> 𝑂 ℤ
forall a. ToIntO a => a -> 𝑂 ℤ
intO 𝔻
d
instance ToIntO64 ℝ where
intO64 :: ℝ -> 𝑂 ℤ64
intO64 (Integer ℤ
i) = ℤ -> 𝑂 ℤ64
forall a. ToIntO64 a => a -> 𝑂 ℤ64
intO64 ℤ
i
intO64 (Rational ℚ
q) = ℚ -> 𝑂 ℤ64
forall a. ToIntO64 a => a -> 𝑂 ℤ64
intO64 ℚ
q
intO64 (Double 𝔻
d) = 𝔻 -> 𝑂 ℤ64
forall a. ToIntO64 a => a -> 𝑂 ℤ64
intO64 𝔻
d
instance ToIntO32 ℝ where
intO32 :: ℝ -> 𝑂 ℤ32
intO32 (Integer ℤ
i) = ℤ -> 𝑂 ℤ32
forall a. ToIntO32 a => a -> 𝑂 ℤ32
intO32 ℤ
i
intO32 (Rational ℚ
q) = ℚ -> 𝑂 ℤ32
forall a. ToIntO32 a => a -> 𝑂 ℤ32
intO32 ℚ
q
intO32 (Double 𝔻
d) = 𝔻 -> 𝑂 ℤ32
forall a. ToIntO32 a => a -> 𝑂 ℤ32
intO32 𝔻
d
instance ToIntO16 ℝ where
intO16 :: ℝ -> 𝑂 ℤ16
intO16 (Integer ℤ
i) = ℤ -> 𝑂 ℤ16
forall a. ToIntO16 a => a -> 𝑂 ℤ16
intO16 ℤ
i
intO16 (Rational ℚ
q) = ℚ -> 𝑂 ℤ16
forall a. ToIntO16 a => a -> 𝑂 ℤ16
intO16 ℚ
q
intO16 (Double 𝔻
d) = 𝔻 -> 𝑂 ℤ16
forall a. ToIntO16 a => a -> 𝑂 ℤ16
intO16 𝔻
d
instance ToIntO8 ℝ where
intO8 :: ℝ -> 𝑂 ℤ8
intO8 (Integer ℤ
i) = ℤ -> 𝑂 ℤ8
forall a. ToIntO8 a => a -> 𝑂 ℤ8
intO8 ℤ
i
intO8 (Rational ℚ
q) = ℚ -> 𝑂 ℤ8
forall a. ToIntO8 a => a -> 𝑂 ℤ8
intO8 ℚ
q
intO8 (Double 𝔻
d) = 𝔻 -> 𝑂 ℤ8
forall a. ToIntO8 a => a -> 𝑂 ℤ8
intO8 𝔻
d
instance ToRational ℝ where
rat :: ℝ -> ℚ
rat (Integer ℤ
i) = ℤ -> ℚ
forall a. ToRational a => a -> ℚ
rat ℤ
i
rat (Rational ℚ
q) = ℚ
q
rat (Double 𝔻
d) = 𝔻 -> ℚ
forall a. ToRational a => a -> ℚ
rat 𝔻
d
instance ToRationalᴾO ℝ where
ratᴾO :: ℝ -> 𝑂 ℚᴾ
ratᴾO (Integer ℤ
i) = ℤ -> 𝑂 ℚᴾ
forall a. ToRationalᴾO a => a -> 𝑂 ℚᴾ
ratᴾO ℤ
i
ratᴾO (Rational ℚ
q) = ℚ -> 𝑂 ℚᴾ
forall a. ToRationalᴾO a => a -> 𝑂 ℚᴾ
ratᴾO ℚ
q
ratᴾO (Double 𝔻
d) = 𝔻 -> 𝑂 ℚᴾ
forall a. ToRationalᴾO a => a -> 𝑂 ℚᴾ
ratᴾO 𝔻
d
instance ToDouble ℝ where
dbl :: ℝ -> 𝔻
dbl (Integer ℤ
i) = ℤ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℤ
i
dbl (Rational ℚ
q) = ℚ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℚ
q
dbl (Double 𝔻
d) = 𝔻
d
instance ToDoubleᴾO ℝ where
dblᴾO :: ℝ -> 𝑂 𝔻ᴾ
dblᴾO (Integer ℤ
i) = ℤ -> 𝑂 𝔻ᴾ
forall a. ToDoubleᴾO a => a -> 𝑂 𝔻ᴾ
dblᴾO ℤ
i
dblᴾO (Rational ℚ
q) = ℚ -> 𝑂 𝔻ᴾ
forall a. ToDoubleᴾO a => a -> 𝑂 𝔻ᴾ
dblᴾO ℚ
q
dblᴾO (Double 𝔻
d) = 𝔻 -> 𝑂 𝔻ᴾ
forall a. ToDoubleᴾO a => a -> 𝑂 𝔻ᴾ
dblᴾO 𝔻
d
instance Zero ℝᴾ where
zero :: ℝᴾ
zero = ℕ -> ℝᴾ
Natural ℕ
forall a. Zero a => a
zero
instance Plus ℝᴾ where
+ :: ℝᴾ -> ℝᴾ -> ℝᴾ
(+) = (ℕ -> ℕ -> ℝᴾ)
-> (ℚᴾ -> ℚᴾ -> ℝᴾ) -> (𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ) -> ℝᴾ -> ℝᴾ -> ℝᴾ
numberBOpᴾ (ℕ -> ℝᴾ
Natural (ℕ -> ℝᴾ) -> (ℕ -> ℕ -> ℕ) -> ℕ -> ℕ -> ℝᴾ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ ℕ -> ℕ -> ℕ
forall a. Plus a => a -> a -> a
(+)) (ℚᴾ -> ℝᴾ
Rationalᴾ (ℚᴾ -> ℝᴾ) -> (ℚᴾ -> ℚᴾ -> ℚᴾ) -> ℚᴾ -> ℚᴾ -> ℝᴾ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ ℚᴾ -> ℚᴾ -> ℚᴾ
forall a. Plus a => a -> a -> a
(+)) (𝔻ᴾ -> ℝᴾ
Doubleᴾ (𝔻ᴾ -> ℝᴾ) -> (𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ) -> 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
forall a. Plus a => a -> a -> a
(+))
instance Minus ℝᴾ where
(-) = (ℕ -> ℕ -> ℝᴾ)
-> (ℚᴾ -> ℚᴾ -> ℝᴾ) -> (𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ) -> ℝᴾ -> ℝᴾ -> ℝᴾ
numberBOpᴾ (ℕ -> ℝᴾ
Natural (ℕ -> ℝᴾ) -> (ℕ -> ℕ -> ℕ) -> ℕ -> ℕ -> ℝᴾ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ (-)) (ℚᴾ -> ℝᴾ
Rationalᴾ (ℚᴾ -> ℝᴾ) -> (ℚᴾ -> ℚᴾ -> ℚᴾ) -> ℚᴾ -> ℚᴾ -> ℝᴾ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ (-)) (𝔻ᴾ -> ℝᴾ
Doubleᴾ (𝔻ᴾ -> ℝᴾ) -> (𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ) -> 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ (-))
instance One ℝᴾ where
one :: ℝᴾ
one = ℕ -> ℝᴾ
Natural ℕ
forall a. One a => a
one
instance Times ℝᴾ where
× :: ℝᴾ -> ℝᴾ -> ℝᴾ
(×) = (ℕ -> ℕ -> ℝᴾ)
-> (ℚᴾ -> ℚᴾ -> ℝᴾ) -> (𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ) -> ℝᴾ -> ℝᴾ -> ℝᴾ
numberBOpᴾ (ℕ -> ℝᴾ
Natural (ℕ -> ℝᴾ) -> (ℕ -> ℕ -> ℕ) -> ℕ -> ℕ -> ℝᴾ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ ℕ -> ℕ -> ℕ
forall a. Times a => a -> a -> a
(×)) (ℚᴾ -> ℝᴾ
Rationalᴾ (ℚᴾ -> ℝᴾ) -> (ℚᴾ -> ℚᴾ -> ℚᴾ) -> ℚᴾ -> ℚᴾ -> ℝᴾ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ ℚᴾ -> ℚᴾ -> ℚᴾ
forall a. Times a => a -> a -> a
(×)) (𝔻ᴾ -> ℝᴾ
Doubleᴾ (𝔻ᴾ -> ℝᴾ) -> (𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ) -> 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
forall a. Times a => a -> a -> a
(×))
instance Divide ℝᴾ where
/ :: ℝᴾ -> ℝᴾ -> ℝᴾ
(/) = (ℕ -> ℕ -> ℝᴾ)
-> (ℚᴾ -> ℚᴾ -> ℝᴾ) -> (𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ) -> ℝᴾ -> ℝᴾ -> ℝᴾ
numberBOpᴾ (\ ℕ
n₁ ℕ
n₂ → ℚᴾ -> ℝᴾ
Rationalᴾ (ℚᴾ -> ℝᴾ) -> ℚᴾ -> ℝᴾ
forall a b. (a -> b) -> a -> b
$ ℕ -> ℚᴾ
forall a. ToRationalᴾ a => a -> ℚᴾ
ratᴾ ℕ
n₁ ℚᴾ -> ℚᴾ -> ℚᴾ
forall a. Divide a => a -> a -> a
/ ℕ -> ℚᴾ
forall a. ToRationalᴾ a => a -> ℚᴾ
ratᴾ ℕ
n₂) (ℚᴾ -> ℝᴾ
Rationalᴾ (ℚᴾ -> ℝᴾ) -> (ℚᴾ -> ℚᴾ -> ℚᴾ) -> ℚᴾ -> ℚᴾ -> ℝᴾ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ ℚᴾ -> ℚᴾ -> ℚᴾ
forall a. Divide a => a -> a -> a
(/)) (𝔻ᴾ -> ℝᴾ
Doubleᴾ (𝔻ᴾ -> ℝᴾ) -> (𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ) -> 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
forall a. Divide a => a -> a -> a
(/))
instance Pon ℝᴾ where
Natural ℕ
m ^^ :: ℝᴾ -> ℕ -> ℝᴾ
^^ ℕ
n = ℕ -> ℝᴾ
Natural (ℕ -> ℝᴾ) -> ℕ -> ℝᴾ
forall a b. (a -> b) -> a -> b
$ ℕ
m ℕ -> ℕ -> ℕ
forall a. Pon a => a -> ℕ -> a
^^ ℕ
n
Rationalᴾ ℚᴾ
q ^^ ℕ
n = ℚᴾ -> ℝᴾ
Rationalᴾ (ℚᴾ -> ℝᴾ) -> ℚᴾ -> ℝᴾ
forall a b. (a -> b) -> a -> b
$ ℚᴾ
q ℚᴾ -> ℕ -> ℚᴾ
forall a. Pon a => a -> ℕ -> a
^^ ℕ
n
Doubleᴾ 𝔻ᴾ
d ^^ ℕ
n = 𝔻ᴾ -> ℝᴾ
Doubleᴾ (𝔻ᴾ -> ℝᴾ) -> 𝔻ᴾ -> ℝᴾ
forall a b. (a -> b) -> a -> b
$ 𝔻ᴾ
d 𝔻ᴾ -> ℕ -> 𝔻ᴾ
forall a. Pon a => a -> ℕ -> a
^^ ℕ
n
instance Pow ℝᴾ where
^ :: ℝᴾ -> ℝᴾ -> ℝᴾ
(^) = (ℕ -> ℕ -> ℝᴾ)
-> (ℚᴾ -> ℚᴾ -> ℝᴾ) -> (𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ) -> ℝᴾ -> ℝᴾ -> ℝᴾ
numberBOpᴾ (ℕ -> ℝᴾ
Natural (ℕ -> ℝᴾ) -> (ℕ -> ℕ -> ℕ) -> ℕ -> ℕ -> ℝᴾ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ ℕ -> ℕ -> ℕ
forall a. Pow a => a -> a -> a
(^)) (\ ℚᴾ
qᴾ₁ ℚᴾ
qᴾ₂ → 𝔻ᴾ -> ℝᴾ
Doubleᴾ (𝔻ᴾ -> ℝᴾ) -> 𝔻ᴾ -> ℝᴾ
forall a b. (a -> b) -> a -> b
$ ℚᴾ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℚᴾ
qᴾ₁ 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
forall a. Pow a => a -> a -> a
^ ℚᴾ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℚᴾ
qᴾ₂) (𝔻ᴾ -> ℝᴾ
Doubleᴾ (𝔻ᴾ -> ℝᴾ) -> (𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ) -> 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
forall a. Pow a => a -> a -> a
(^))
instance Root ℝᴾ where
root :: ℝᴾ -> ℝᴾ
root (Natural ℕ
n) = 𝔻ᴾ -> ℝᴾ
Doubleᴾ (𝔻ᴾ -> ℝᴾ) -> 𝔻ᴾ -> ℝᴾ
forall a b. (a -> b) -> a -> b
$ 𝔻ᴾ -> 𝔻ᴾ
forall a. Root a => a -> a
root (𝔻ᴾ -> 𝔻ᴾ) -> 𝔻ᴾ -> 𝔻ᴾ
forall a b. (a -> b) -> a -> b
$ ℕ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℕ
n
root (Rationalᴾ ℚᴾ
q) = 𝔻ᴾ -> ℝᴾ
Doubleᴾ (𝔻ᴾ -> ℝᴾ) -> 𝔻ᴾ -> ℝᴾ
forall a b. (a -> b) -> a -> b
$ 𝔻ᴾ -> 𝔻ᴾ
forall a. Root a => a -> a
root (𝔻ᴾ -> 𝔻ᴾ) -> 𝔻ᴾ -> 𝔻ᴾ
forall a b. (a -> b) -> a -> b
$ ℚᴾ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℚᴾ
q
root (Doubleᴾ 𝔻ᴾ
d) = 𝔻ᴾ -> ℝᴾ
Doubleᴾ (𝔻ᴾ -> ℝᴾ) -> 𝔻ᴾ -> ℝᴾ
forall a b. (a -> b) -> a -> b
$ 𝔻ᴾ -> 𝔻ᴾ
forall a. Root a => a -> a
root 𝔻ᴾ
d
instance Log ℝᴾ where
log :: ℝᴾ -> ℝᴾ
log (Natural ℕ
n) = 𝔻ᴾ -> ℝᴾ
Doubleᴾ (𝔻ᴾ -> ℝᴾ) -> 𝔻ᴾ -> ℝᴾ
forall a b. (a -> b) -> a -> b
$ 𝔻ᴾ -> 𝔻ᴾ
forall a. Log a => a -> a
log (𝔻ᴾ -> 𝔻ᴾ) -> 𝔻ᴾ -> 𝔻ᴾ
forall a b. (a -> b) -> a -> b
$ ℕ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℕ
n
log (Rationalᴾ ℚᴾ
q) = 𝔻ᴾ -> ℝᴾ
Doubleᴾ (𝔻ᴾ -> ℝᴾ) -> 𝔻ᴾ -> ℝᴾ
forall a b. (a -> b) -> a -> b
$ 𝔻ᴾ -> 𝔻ᴾ
forall a. Log a => a -> a
log (𝔻ᴾ -> 𝔻ᴾ) -> 𝔻ᴾ -> 𝔻ᴾ
forall a b. (a -> b) -> a -> b
$ ℚᴾ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℚᴾ
q
log (Doubleᴾ 𝔻ᴾ
d) = 𝔻ᴾ -> ℝᴾ
Doubleᴾ (𝔻ᴾ -> ℝᴾ) -> 𝔻ᴾ -> ℝᴾ
forall a b. (a -> b) -> a -> b
$ 𝔻ᴾ -> 𝔻ᴾ
forall a. Log a => a -> a
log 𝔻ᴾ
d
instance Bot ℝᴾ where bot :: ℝᴾ
bot = ℝᴾ
forall a. Zero a => a
zero
instance Join ℝᴾ where ⊔ :: ℝᴾ -> ℝᴾ -> ℝᴾ
(⊔) = (ℕ -> ℕ -> ℝᴾ)
-> (ℚᴾ -> ℚᴾ -> ℝᴾ) -> (𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ) -> ℝᴾ -> ℝᴾ -> ℝᴾ
numberBOpᴾ (ℕ -> ℝᴾ
Natural (ℕ -> ℝᴾ) -> (ℕ -> ℕ -> ℕ) -> ℕ -> ℕ -> ℝᴾ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ ℕ -> ℕ -> ℕ
forall a. Join a => a -> a -> a
(⊔)) (ℚᴾ -> ℝᴾ
Rationalᴾ (ℚᴾ -> ℝᴾ) -> (ℚᴾ -> ℚᴾ -> ℚᴾ) -> ℚᴾ -> ℚᴾ -> ℝᴾ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ ℚᴾ -> ℚᴾ -> ℚᴾ
forall a. Join a => a -> a -> a
(⊔)) (𝔻ᴾ -> ℝᴾ
Doubleᴾ (𝔻ᴾ -> ℝᴾ) -> (𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ) -> 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
forall a. Join a => a -> a -> a
(⊔))
instance Meet ℝᴾ where ⊓ :: ℝᴾ -> ℝᴾ -> ℝᴾ
(⊓) = (ℕ -> ℕ -> ℝᴾ)
-> (ℚᴾ -> ℚᴾ -> ℝᴾ) -> (𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ) -> ℝᴾ -> ℝᴾ -> ℝᴾ
numberBOpᴾ (ℕ -> ℝᴾ
Natural (ℕ -> ℝᴾ) -> (ℕ -> ℕ -> ℕ) -> ℕ -> ℕ -> ℝᴾ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ ℕ -> ℕ -> ℕ
forall a. Meet a => a -> a -> a
(⊓)) (ℚᴾ -> ℝᴾ
Rationalᴾ (ℚᴾ -> ℝᴾ) -> (ℚᴾ -> ℚᴾ -> ℚᴾ) -> ℚᴾ -> ℚᴾ -> ℝᴾ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ ℚᴾ -> ℚᴾ -> ℚᴾ
forall a. Meet a => a -> a -> a
(⊓)) (𝔻ᴾ -> ℝᴾ
Doubleᴾ (𝔻ᴾ -> ℝᴾ) -> (𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ) -> 𝔻ᴾ -> 𝔻ᴾ -> ℝᴾ
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
∘∘ 𝔻ᴾ -> 𝔻ᴾ -> 𝔻ᴾ
forall a. Meet a => a -> a -> a
(⊓))
instance Null ℝᴾ where null :: ℝᴾ
null = ℝᴾ
forall a. Zero a => a
zero
instance Append ℝᴾ where ⧺ :: ℝᴾ -> ℝᴾ -> ℝᴾ
(⧺) = ℝᴾ -> ℝᴾ -> ℝᴾ
forall a. Plus a => a -> a -> a
(+)
instance Additive ℝᴾ
instance Multiplicative ℝᴾ
instance JoinLattice ℝᴾ
instance Monoid ℝᴾ
instance ToNatO ℝᴾ where
natO :: ℝᴾ -> 𝑂 ℕ
natO (Natural ℕ
n) = ℕ -> 𝑂 ℕ
forall a. a -> 𝑂 a
Some ℕ
n
natO (Rationalᴾ ℚᴾ
q) = ℚᴾ -> 𝑂 ℕ
forall a. ToNatO a => a -> 𝑂 ℕ
natO ℚᴾ
q
natO (Doubleᴾ 𝔻ᴾ
d) = 𝔻ᴾ -> 𝑂 ℕ
forall a. ToNatO a => a -> 𝑂 ℕ
natO 𝔻ᴾ
d
instance ToNatO64 ℝᴾ where
natO64 :: ℝᴾ -> 𝑂 ℕ64
natO64 (Natural ℕ
n) = ℕ -> 𝑂 ℕ64
forall a. ToNatO64 a => a -> 𝑂 ℕ64
natO64 ℕ
n
natO64 (Rationalᴾ ℚᴾ
q) = ℚᴾ -> 𝑂 ℕ64
forall a. ToNatO64 a => a -> 𝑂 ℕ64
natO64 ℚᴾ
q
natO64 (Doubleᴾ 𝔻ᴾ
d) = 𝔻ᴾ -> 𝑂 ℕ64
forall a. ToNatO64 a => a -> 𝑂 ℕ64
natO64 𝔻ᴾ
d
instance ToNatO32 ℝᴾ where
natO32 :: ℝᴾ -> 𝑂 ℕ32
natO32 (Natural ℕ
n) = ℕ -> 𝑂 ℕ32
forall a. ToNatO32 a => a -> 𝑂 ℕ32
natO32 ℕ
n
natO32 (Rationalᴾ ℚᴾ
q) = ℚᴾ -> 𝑂 ℕ32
forall a. ToNatO32 a => a -> 𝑂 ℕ32
natO32 ℚᴾ
q
natO32 (Doubleᴾ 𝔻ᴾ
d) = 𝔻ᴾ -> 𝑂 ℕ32
forall a. ToNatO32 a => a -> 𝑂 ℕ32
natO32 𝔻ᴾ
d
instance ToNatO16 ℝᴾ where
natO16 :: ℝᴾ -> 𝑂 ℕ16
natO16 (Natural ℕ
n) = ℕ -> 𝑂 ℕ16
forall a. ToNatO16 a => a -> 𝑂 ℕ16
natO16 ℕ
n
natO16 (Rationalᴾ ℚᴾ
q) = ℚᴾ -> 𝑂 ℕ16
forall a. ToNatO16 a => a -> 𝑂 ℕ16
natO16 ℚᴾ
q
natO16 (Doubleᴾ 𝔻ᴾ
d) = 𝔻ᴾ -> 𝑂 ℕ16
forall a. ToNatO16 a => a -> 𝑂 ℕ16
natO16 𝔻ᴾ
d
instance ToNatO8 ℝᴾ where
natO8 :: ℝᴾ -> 𝑂 ℕ8
natO8 (Natural ℕ
n) = ℕ -> 𝑂 ℕ8
forall a. ToNatO8 a => a -> 𝑂 ℕ8
natO8 ℕ
n
natO8 (Rationalᴾ ℚᴾ
q) = ℚᴾ -> 𝑂 ℕ8
forall a. ToNatO8 a => a -> 𝑂 ℕ8
natO8 ℚᴾ
q
natO8 (Doubleᴾ 𝔻ᴾ
d) = 𝔻ᴾ -> 𝑂 ℕ8
forall a. ToNatO8 a => a -> 𝑂 ℕ8
natO8 𝔻ᴾ
d
instance ToIntO ℝᴾ where
intO :: ℝᴾ -> 𝑂 ℤ
intO (Natural ℕ
n) = ℤ -> 𝑂 ℤ
forall a. a -> 𝑂 a
Some (ℤ -> 𝑂 ℤ) -> ℤ -> 𝑂 ℤ
forall a b. (a -> b) -> a -> b
$ ℕ -> ℤ
forall a. ToInt a => a -> ℤ
int ℕ
n
intO (Rationalᴾ ℚᴾ
q) = ℚᴾ -> 𝑂 ℤ
forall a. ToIntO a => a -> 𝑂 ℤ
intO ℚᴾ
q
intO (Doubleᴾ 𝔻ᴾ
d) = 𝔻ᴾ -> 𝑂 ℤ
forall a. ToIntO a => a -> 𝑂 ℤ
intO 𝔻ᴾ
d
instance ToIntO64 ℝᴾ where
intO64 :: ℝᴾ -> 𝑂 ℤ64
intO64 (Natural ℕ
n) = ℕ -> 𝑂 ℤ64
forall a. ToIntO64 a => a -> 𝑂 ℤ64
intO64 ℕ
n
intO64 (Rationalᴾ ℚᴾ
q) = ℚᴾ -> 𝑂 ℤ64
forall a. ToIntO64 a => a -> 𝑂 ℤ64
intO64 ℚᴾ
q
intO64 (Doubleᴾ 𝔻ᴾ
d) = 𝔻ᴾ -> 𝑂 ℤ64
forall a. ToIntO64 a => a -> 𝑂 ℤ64
intO64 𝔻ᴾ
d
instance ToIntO32 ℝᴾ where
intO32 :: ℝᴾ -> 𝑂 ℤ32
intO32 (Natural ℕ
n) = ℕ -> 𝑂 ℤ32
forall a. ToIntO32 a => a -> 𝑂 ℤ32
intO32 ℕ
n
intO32 (Rationalᴾ ℚᴾ
q) = ℚᴾ -> 𝑂 ℤ32
forall a. ToIntO32 a => a -> 𝑂 ℤ32
intO32 ℚᴾ
q
intO32 (Doubleᴾ 𝔻ᴾ
d) = 𝔻ᴾ -> 𝑂 ℤ32
forall a. ToIntO32 a => a -> 𝑂 ℤ32
intO32 𝔻ᴾ
d
instance ToIntO16 ℝᴾ where
intO16 :: ℝᴾ -> 𝑂 ℤ16
intO16 (Natural ℕ
n) = ℕ -> 𝑂 ℤ16
forall a. ToIntO16 a => a -> 𝑂 ℤ16
intO16 ℕ
n
intO16 (Rationalᴾ ℚᴾ
q) = ℚᴾ -> 𝑂 ℤ16
forall a. ToIntO16 a => a -> 𝑂 ℤ16
intO16 ℚᴾ
q
intO16 (Doubleᴾ 𝔻ᴾ
d) = 𝔻ᴾ -> 𝑂 ℤ16
forall a. ToIntO16 a => a -> 𝑂 ℤ16
intO16 𝔻ᴾ
d
instance ToIntO8 ℝᴾ where
intO8 :: ℝᴾ -> 𝑂 ℤ8
intO8 (Natural ℕ
n) = ℕ -> 𝑂 ℤ8
forall a. ToIntO8 a => a -> 𝑂 ℤ8
intO8 ℕ
n
intO8 (Rationalᴾ ℚᴾ
q) = ℚᴾ -> 𝑂 ℤ8
forall a. ToIntO8 a => a -> 𝑂 ℤ8
intO8 ℚᴾ
q
intO8 (Doubleᴾ 𝔻ᴾ
d) = 𝔻ᴾ -> 𝑂 ℤ8
forall a. ToIntO8 a => a -> 𝑂 ℤ8
intO8 𝔻ᴾ
d
instance ToRational ℝᴾ where
rat :: ℝᴾ -> ℚ
rat (Natural ℕ
n) = ℕ -> ℚ
forall a. ToRational a => a -> ℚ
rat ℕ
n
rat (Rationalᴾ ℚᴾ
q) = ℚᴾ -> ℚ
forall a. ToRational a => a -> ℚ
rat ℚᴾ
q
rat (Doubleᴾ 𝔻ᴾ
d) = 𝔻ᴾ -> ℚ
forall a. ToRational a => a -> ℚ
rat 𝔻ᴾ
d
instance ToRationalᴾO ℝᴾ where
ratᴾO :: ℝᴾ -> 𝑂 ℚᴾ
ratᴾO (Natural ℕ
n) = ℚᴾ -> 𝑂 ℚᴾ
forall a. a -> 𝑂 a
Some (ℚᴾ -> 𝑂 ℚᴾ) -> ℚᴾ -> 𝑂 ℚᴾ
forall a b. (a -> b) -> a -> b
$ ℕ -> ℚᴾ
forall a. ToRationalᴾ a => a -> ℚᴾ
ratᴾ ℕ
n
ratᴾO (Rationalᴾ ℚᴾ
q) = ℚᴾ -> 𝑂 ℚᴾ
forall a. a -> 𝑂 a
Some ℚᴾ
q
ratᴾO (Doubleᴾ 𝔻ᴾ
d) = 𝔻ᴾ -> 𝑂 ℚᴾ
forall a. ToRationalᴾO a => a -> 𝑂 ℚᴾ
ratᴾO 𝔻ᴾ
d
instance ToDouble ℝᴾ where
dbl :: ℝᴾ -> 𝔻
dbl (Natural ℕ
n) = ℕ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℕ
n
dbl (Rationalᴾ ℚᴾ
q) = ℚᴾ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl ℚᴾ
q
dbl (Doubleᴾ 𝔻ᴾ
d) = 𝔻ᴾ -> 𝔻
forall a. ToDouble a => a -> 𝔻
dbl 𝔻ᴾ
d
instance ToDoubleᴾ ℝᴾ where
dblᴾ :: ℝᴾ -> 𝔻ᴾ
dblᴾ (Natural ℕ
n) = ℕ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℕ
n
dblᴾ (Rationalᴾ ℚᴾ
q) = ℚᴾ -> 𝔻ᴾ
forall a. ToDoubleᴾ a => a -> 𝔻ᴾ
dblᴾ ℚᴾ
q
dblᴾ (Doubleᴾ 𝔻ᴾ
d) = 𝔻ᴾ
d