diff options
author | Bodigrim <andrew.lelechenko@gmail.com> | 2023-05-10 19:05:07 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-05-13 08:45:58 -0400 |
commit | 8a0d45f7d846e92cf4b6641fd8c67606412cdb3a (patch) | |
tree | 3bcd8a83820e419b254e632be69614b86b9ca5ba /libraries/base/Data/Functor/Compose.hs | |
parent | d85ed900b271109185251cb0494d51048a4cf213 (diff) | |
download | haskell-8a0d45f7d846e92cf4b6641fd8c67606412cdb3a.tar.gz |
Add more instances for Compose: Enum, Bounded, Num, Real, Integral
See https://github.com/haskell/core-libraries-committee/issues/160 for discussion
Diffstat (limited to 'libraries/base/Data/Functor/Compose.hs')
-rw-r--r-- | libraries/base/Data/Functor/Compose.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libraries/base/Data/Functor/Compose.hs b/libraries/base/Data/Functor/Compose.hs index d705e8ee70..ef2d305a7a 100644 --- a/libraries/base/Data/Functor/Compose.hs +++ b/libraries/base/Data/Functor/Compose.hs @@ -156,3 +156,14 @@ instance (TestEquality f) => TestEquality (Compose f g) where case testEquality x y of -- :: Maybe (g x :~: g y) Just Refl -> Just Refl -- :: Maybe (x :~: y) Nothing -> Nothing + +-- | @since 4.19.0.0 +deriving instance Enum (f (g a)) => Enum (Compose f g a) +-- | @since 4.19.0.0 +deriving instance Bounded (f (g a)) => Bounded (Compose f g a) +-- | @since 4.19.0.0 +deriving instance Num (f (g a)) => Num (Compose f g a) +-- | @since 4.19.0.0 +deriving instance Real (f (g a)) => Real (Compose f g a) +-- | @since 4.19.0.0 +deriving instance Integral (f (g a)) => Integral (Compose f g a) |