Num a => Num (Down a)
There are many missing instances for Down
, I happened to need Num (Down _)
. It can be derived with GND:
newtype Down a = Down a deriving (Eq, Show, Read, Num)
which let's us write
>>> (<) 10 20
True
>>> (<) @(Down _) 10 20
False
We can of course add instances for Functor
, Applicative
, Monad
, MonadFix
, ... I don't know that they would see use but we can use Identity
, Dual
instances.
With #12363
>>> 10 < @(Down _) 20
False
>>> 10 < @Down{} 20
False