% package:o-clock

Type family for normalized pair of Nats — Rat.
More convenient name for promoted constructor of Rat.
Comparison of type-level rationals, as a function.
>>> :kind! (1 :% 42) >=% (5 :% 42)
(1 :% 42) >=% (5 :% 42) :: Bool
= 'False
>>> :kind! (5 :% 42) >=% (1 :% 42)
(5 :% 42) >=% (1 :% 42) :: Bool
= 'True
>>> :kind! (42 :% 1) >=% (42 :% 1)
(42 :% 1) >=% (42 :% 1) :: Bool
= 'True
Compute the difference between two amounts of time. The result is returned in two components: the ordering (which input is larger) and the numeric difference (how much larger). Unlike -:-, does not throw ArithException.
>>> sec 5 -%- sec 3
(GT,2s)
>>> sec 5 -%- sec 6
(LT,1s)