packages feed

base-orphans 0.9.1 → 0.9.2

raw patch · 6 files changed

+39/−10 lines, 6 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Data.Orphans: instance (GHC.Enum.Enum a, GHC.Enum.Bounded a, GHC.Classes.Eq a) => GHC.Enum.Enum (Data.Ord.Down a)
- 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 GHC.Base.Functor ((,,,,) a b c d)
- Data.Orphans: instance GHC.Base.Functor ((,,,,,) a b c d e)
- Data.Orphans: instance GHC.Base.Functor ((,,,,,,) a b c d e f)
+ Data.Orphans: instance GHC.Classes.Eq (GHC.TypeLits.SChar c)
+ Data.Orphans: instance GHC.Classes.Eq (GHC.TypeLits.SSymbol s)
+ Data.Orphans: instance GHC.Classes.Eq (GHC.TypeNats.SNat n)
+ Data.Orphans: instance GHC.Classes.Ord (GHC.TypeLits.SChar c)
+ Data.Orphans: instance GHC.Classes.Ord (GHC.TypeLits.SSymbol s)
+ Data.Orphans: instance GHC.Classes.Ord (GHC.TypeNats.SNat n)
+ Data.Orphans: instance forall k k1 (f :: k -> *) (g :: k1 -> k) (a :: k1). GHC.Float.Floating (f (g a)) => GHC.Float.Floating (Data.Functor.Compose.Compose f g a)
+ Data.Orphans: instance forall k k1 (f :: k -> *) (g :: k1 -> k) (a :: k1). GHC.Float.RealFloat (f (g a)) => GHC.Float.RealFloat (Data.Functor.Compose.Compose f g a)
+ Data.Orphans: instance forall k k1 (f :: k -> *) (g :: k1 -> k) (a :: k1). GHC.Real.Fractional (f (g a)) => GHC.Real.Fractional (Data.Functor.Compose.Compose f g a)
+ Data.Orphans: instance forall k k1 (f :: k -> *) (g :: k1 -> k) (a :: k1). GHC.Real.Integral (f (g a)) => GHC.Real.Integral (Data.Functor.Compose.Compose f g a)
+ Data.Orphans: instance forall k k1 (f :: k -> *) (g :: k1 -> k) (a :: k1). GHC.Real.Real (f (g 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.Real.RealFrac (f (g a)) => GHC.Real.RealFrac (Data.Functor.Compose.Compose f g a)

Files

CHANGES.markdown view
@@ -1,3 +1,7 @@+## Changes in 0.9.2 [2024.04.30]+ - Backport new instances from GHC 9.10/`base-4.20`:+   * `Fractional`, `RealFrac`, `Floating`, and `RealFloat` instances for `Compose`+ ## 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`
README.markdown view
@@ -60,7 +60,7 @@  * `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`+ * `Enum`, `Bounded`, `Num`, `Real`, `Integral`, `Fractional`, `RealFrac`, `Floating`, and `RealFloat` instances for `Compose`  * `Foldable` instance for `Either`, `(,)` and `Const`  * `Foldable` and `Traversable` instances for `Alt` from `Data.Monoid`  * `Functor`, `Applicative`, and `Monad` instances for@@ -106,6 +106,7 @@  ## Supported versions of GHC/`base` + * `ghc-9.10.*` / `base-4.20.*`  * `ghc-9.8.*`  / `base-4.19.*`  * `ghc-9.6.*`  / `base-4.18.*`  * `ghc-9.4.*`  / `base-4.17.*`
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.4.+-- This file has been generated from package.yaml by hpack version 0.36.0. -- -- see: https://github.com/sol/hpack ----- hash: 4e4482d938177240bd3d33937246a570b07764edf79c92c1609492b56b35944b+-- hash: 0c23e2cb85ef24758da1fa779ef857dc3889dfc4238a4057841a071b38ce3e96  name:                base-orphans-version:             0.9.1+version:             0.9.2 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.8 , GHC == 9.4.5 , GHC == 9.6.2 , GHC == 9.8.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.8 , GHC == 9.6.5 , GHC == 9.8.2 , GHC == 9.10.1 extra-source-files:     CHANGES.markdown     README.markdown
src/Data/Orphans.hs view
@@ -94,7 +94,7 @@ # endif #endif -#if !(MIN_VERSION_base(4,19,0))+#if !(MIN_VERSION_base(4,20,0)) import           Data.Orphans.Prelude #endif @@ -2047,6 +2047,25 @@   _ == _ = True instance Ord (SSymbol s) where   compare _ _ = EQ+# endif+#endif++#if !(MIN_VERSION_base(4,20,0))+# if MIN_VERSION_base(4,9,0)+deriving instance Fractional (f (g a)) => Fractional (Compose f g a)+deriving instance Floating (f (g a)) => Floating (Compose f g a)++-- RealFrac and RealFloat both have Ord as a superclass. For the reasons stated+-- above (near the Real/Integral instances for Compose), these+-- RealFrace/RealFloat instances are slightly more complicated for older+-- versions of base.+#  if MIN_VERSION_base(4,18,0)+deriving instance RealFrac (f (g a)) => RealFrac (Compose f g a)+deriving instance RealFloat (f (g a)) => RealFloat (Compose f g a)+#  else+deriving instance (RealFrac (f (g a)), Ord1 f, Ord1 g, Ord a) => RealFrac (Compose f g a)+deriving instance (RealFloat (f (g a)), Ord1 f, Ord1 g, Ord a) => RealFloat (Compose f g a)+#  endif # 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,19,0)+#if MIN_VERSION_base(4,20,0)     () where #else     ( module OrphansPrelude
test/Data/Version/OrphansSpec.hs view
@@ -18,12 +18,17 @@   describe "Data Version instance" $     it "allows obtaining a Version constructor" $       dataTypeName (dataTypeOf (Version [1,2,3] [])) `shouldBe`--- Some old versions of GHC incorrectly return "Version" instead of--- "Data.Version.Version" due to--- https://gitlab.haskell.org/ghc/ghc/-/issues/20371. #if __GLASGOW_HASKELL__ >= 801 && __GLASGOW_HASKELL__ < 903+        -- Some old versions of GHC incorrectly return "Version" due to+        -- https://gitlab.haskell.org/ghc/ghc/-/issues/20371.         "Version"+#elif __GLASGOW_HASKELL__ >= 910+        -- In GHC 9.10 and later, Version is defined in+        -- GHC.Internal.Data.Version (in the ghc-internal library).+        "GHC.Internal.Data.Version.Version" #else+        -- In older versions of GHC, Version is defined in Data.Version (in the+        -- base library).         "Data.Version.Version" #endif