base-orphans 0.9.0 → 0.9.1
raw patch · 5 files changed
+63/−7 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Data.Orphans: instance (GHC.Real.Integral (f (g a)), Data.Functor.Classes.Ord1 f, Data.Functor.Classes.Ord1 g, GHC.Classes.Ord a) => GHC.Real.Integral (Data.Functor.Compose.Compose f g a)
+ Data.Orphans: instance (GHC.Real.Real (f (g a)), Data.Functor.Classes.Ord1 f, Data.Functor.Classes.Ord1 g, GHC.Classes.Ord a) => GHC.Real.Real (Data.Functor.Compose.Compose f g a)
+ Data.Orphans: instance forall k k1 (f :: k -> *) (g :: k1 -> k) (a :: k1). GHC.Enum.Bounded (f (g a)) => GHC.Enum.Bounded (Data.Functor.Compose.Compose f g a)
+ Data.Orphans: instance forall k k1 (f :: k -> *) (g :: k1 -> k) (a :: k1). GHC.Enum.Enum (f (g a)) => GHC.Enum.Enum (Data.Functor.Compose.Compose f g a)
+ Data.Orphans: instance forall k k1 (f :: k -> *) (g :: k1 -> k) (a :: k1). GHC.Num.Num (f (g a)) => GHC.Num.Num (Data.Functor.Compose.Compose f g a)
Files
- CHANGES.markdown +10/−1
- README.markdown +3/−0
- base-orphans.cabal +4/−4
- src/Data/Orphans.hs +45/−1
- src/Data/Orphans/Prelude.hs +1/−1
CHANGES.markdown view
@@ -1,3 +1,8 @@+## Changes in 0.9.1 [2023.10.11]+ - Backport new instances from GHC 9.8/`base-4.19`:+ * `Eq` and `Ord` instances for `SChar`, `SNat`, and `SSymbol`+ * `Enum`, `Bounded`, `Num`, `Real`, and `Integral` instances for `Compose`+ ## Changes in 0.9.0 [2023.03.05] - Adapt to recent changes to `Down` instances: * The `Bounded` instance for `Down` was changed in `base-4.15.0.0` to swap@@ -13,11 +18,15 @@ release, as it actively makes it more difficult to define the aforementioned `Enum` instance. +## Changes in 0.8.8.1 [2023.03.05]+ - Fix GHC 9.4 build error that was accidentally introduced in+ `base-orphans-0.8.8`.+ ## Changes in 0.8.8 [2023.03.05] - Backport new instances from GHC 9.6.1/`base-4.18.0.0`: * `Functor` instances for the `(,,,,) a b c d`, `(,,,,,) a b c d e`, and `(,,,,,) a b c d e f` tuple types.- * `Eq` and `Ord` instances for `Generically`+ * `Eq` and `Ord` instances for `Generically1` ## Changes in 0.8.7 [2022.08.11] - Backport new instances from GHC 9.2.2/`base-4.16.1.0`:
README.markdown view
@@ -57,8 +57,10 @@ * `Eq`, `Ord`, `Read`, and `Show` instances for data types in `GHC.Generics` * `Eq`, `Ord`, `Bounded`, `Enum`, and `Ix` instances for `Solo` * `Eq` and `Ord` instances for `Generically1`+ * `Eq` and `Ord` instances for `SChar`, `SNat`, and `SSymbol` * `Eq1`, `Read1`, and `Show1` instances for `Complex` * `Eq1`, `Ord1`, `Read1`, and `Show1` instances for `NonEmpty`+ * `Enum`, `Bounded`, `Num`, `Real`, and `Integral` instances for `Compose` * `Foldable` instance for `Either`, `(,)` and `Const` * `Foldable` and `Traversable` instances for `Alt` from `Data.Monoid` * `Functor`, `Applicative`, and `Monad` instances for@@ -104,6 +106,7 @@ ## Supported versions of GHC/`base` + * `ghc-9.8.*` / `base-4.19.*` * `ghc-9.6.*` / `base-4.18.*` * `ghc-9.4.*` / `base-4.17.*` * `ghc-9.2.*` / `base-4.16.*`
base-orphans.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.35.2.+-- This file has been generated from package.yaml by hpack version 0.35.4. -- -- see: https://github.com/sol/hpack ----- hash: 7aa19d6f2d3a7409ee405d67a21b8edb902103b703a6f241f2b5e8e219f70a87+-- hash: 4e4482d938177240bd3d33937246a570b07764edf79c92c1609492b56b35944b name: base-orphans-version: 0.9.0+version: 0.9.1 synopsis: Backwards-compatible orphan instances for base description: @base-orphans@ defines orphan instances that mimic instances available in later versions of @base@ to a wider (older) range of compilers.@@ -36,7 +36,7 @@ license-file: LICENSE build-type: Simple tested-with:- GHC == 7.0.4 , GHC == 7.2.2 , GHC == 7.4.2 , GHC == 7.6.3 , GHC == 7.8.4 , GHC == 7.10.3 , GHC == 8.0.2 , GHC == 8.2.2 , GHC == 8.4.4 , GHC == 8.6.5 , GHC == 8.8.4 , GHC == 8.10.7 , GHC == 9.0.2 , GHC == 9.2.7 , GHC == 9.4.4 , GHC == 9.6.1+ GHC == 7.0.4 , GHC == 7.2.2 , GHC == 7.4.2 , GHC == 7.6.3 , GHC == 7.8.4 , GHC == 7.10.3 , GHC == 8.0.2 , GHC == 8.2.2 , GHC == 8.4.4 , GHC == 8.6.5 , GHC == 8.8.4 , GHC == 8.10.7 , GHC == 9.0.2 , GHC == 9.2.8 , GHC == 9.4.5 , GHC == 9.6.2 , GHC == 9.8.1 extra-source-files: CHANGES.markdown README.markdown
src/Data/Orphans.hs view
@@ -94,7 +94,7 @@ # endif #endif -#if !(MIN_VERSION_base(4,18,0))+#if !(MIN_VERSION_base(4,19,0)) import Data.Orphans.Prelude #endif @@ -2003,6 +2003,50 @@ instance (Generic1 f, Ord (Rep1 f a)) => Ord (Generically1 f a) where Generically1 x `compare` Generically1 y = from1 x `compare` from1 y+# endif+#endif++#if !(MIN_VERSION_base(4,19,0))+# if MIN_VERSION_base(4,9,0)+deriving instance Enum (f (g a)) => Enum (Compose f g a)+deriving instance Bounded (f (g a)) => Bounded (Compose f g a)+deriving instance Num (f (g a)) => Num (Compose f g a)++-- In base-4.18.0.0, the Ord instance for Compose was simplified to:+--+-- instance Ord (f (g a)) => Ord (Compose f g a)+--+-- Before that, the Ord instance was defined as:+--+-- instance (Ord1 f, Ord1 g, Ord a) => Ord (Compose f g a)+--+-- This makes deriving Real and Integral instances slightly more complicated for+-- these older versions of base, as there are no Real1 or Integral1 classes. We+-- opt for making the instance contexts more complicated instead.+# if MIN_VERSION_base(4,18,0)+deriving instance Real (f (g a)) => Real (Compose f g a)+deriving instance Integral (f (g a)) => Integral (Compose f g a)+# else+deriving instance (Real (f (g a)), Ord1 f, Ord1 g, Ord a) => Real (Compose f g a)+deriving instance (Integral (f (g a)), Ord1 f, Ord1 g, Ord a) => Integral (Compose f g a)+# endif+# endif++# if MIN_VERSION_base(4,18,0)+instance Eq (SChar c) where+ _ == _ = True+instance Ord (SChar c) where+ compare _ _ = EQ++instance Eq (SNat n) where+ _ == _ = True+instance Ord (SNat n) where+ compare _ _ = EQ++instance Eq (SSymbol s) where+ _ == _ = True+instance Ord (SSymbol s) where+ compare _ _ = EQ # endif #endif
src/Data/Orphans/Prelude.hs view
@@ -21,7 +21,7 @@ Note that this module does not export any modules that could introduce name clashes. -} module Data.Orphans.Prelude-#if MIN_VERSION_base(4,18,0)+#if MIN_VERSION_base(4,19,0) () where #else ( module OrphansPrelude