packages feed

base-orphans 0.7 → 0.8

raw patch · 5 files changed

+110/−15 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Data.Orphans: instance Control.Monad.Fail.MonadFail (GHC.ST.ST s)
- Data.Orphans: instance Data.Data.Data Foreign.Ptr.IntPtr
- Data.Orphans: instance Data.Data.Data Foreign.Ptr.WordPtr
- Data.Orphans: instance Data.Semigroup.Semigroup a => Data.Semigroup.Semigroup (Data.Ord.Down a)
- Data.Orphans: instance Data.Semigroup.Semigroup a => Data.Semigroup.Semigroup (GHC.ST.ST s a)
- Data.Orphans: instance GHC.Base.Alternative Control.Applicative.ZipList
- Data.Orphans: instance GHC.Base.Applicative Data.Ord.Down
- Data.Orphans: instance GHC.Base.Functor Data.Ord.Down
- Data.Orphans: instance GHC.Base.Monad Data.Ord.Down
- Data.Orphans: instance GHC.Base.Monoid a => GHC.Base.Monoid (Data.Ord.Down a)
- Data.Orphans: instance GHC.Base.Monoid a => GHC.Base.Monoid (GHC.ST.ST s a)
- Data.Orphans: instance GHC.Num.Num a => GHC.Num.Num (Data.Ord.Down a)
+ Data.Orphans: instance Control.Monad.Fix.MonadFix Data.Ord.Down
+ Data.Orphans: instance Control.Monad.Zip.MonadZip Data.Ord.Down
+ Data.Orphans: instance Data.Data.Data a => Data.Data.Data (Data.Ord.Down a)
+ Data.Orphans: instance Data.Foldable.Foldable Data.Ord.Down
+ Data.Orphans: instance Data.Foldable.Foldable f => Data.Foldable.Foldable (Data.Semigroup.Internal.Alt f)
+ Data.Orphans: instance Data.Functor.Classes.Eq1 Data.Ord.Down
+ Data.Orphans: instance Data.Functor.Classes.Ord1 Data.Ord.Down
+ Data.Orphans: instance Data.Functor.Classes.Read1 Data.Ord.Down
+ Data.Orphans: instance Data.Functor.Classes.Show1 Data.Ord.Down
+ Data.Orphans: instance Data.Traversable.Traversable Data.Ord.Down
+ Data.Orphans: instance Data.Traversable.Traversable f => Data.Traversable.Traversable (Data.Semigroup.Internal.Alt f)
+ Data.Orphans: instance GHC.Base.Monoid c => GHC.Base.Applicative (GHC.Generics.K1 i c)
+ Data.Orphans: instance GHC.Base.Monoid p => GHC.Base.Monoid (GHC.Generics.Par1 p)
+ Data.Orphans: instance GHC.Base.Semigroup p => GHC.Base.Semigroup (GHC.Generics.Par1 p)
+ Data.Orphans: instance forall k (f :: k -> *) (p :: k) (g :: k -> *). (GHC.Base.Monoid (f p), GHC.Base.Monoid (g p)) => GHC.Base.Monoid ((GHC.Generics.:*:) f g p)
+ Data.Orphans: instance forall k (f :: k -> *) (p :: k) (g :: k -> *). (GHC.Base.Semigroup (f p), GHC.Base.Semigroup (g p)) => GHC.Base.Semigroup ((GHC.Generics.:*:) f g p)
+ Data.Orphans: instance forall k (f :: k -> *) (p :: k) i (c :: GHC.Generics.Meta). GHC.Base.Monoid (f p) => GHC.Base.Monoid (GHC.Generics.M1 i c f p)
+ Data.Orphans: instance forall k (f :: k -> *) (p :: k) i (c :: GHC.Generics.Meta). GHC.Base.Semigroup (f p) => GHC.Base.Semigroup (GHC.Generics.M1 i c f p)
+ Data.Orphans: instance forall k (f :: k -> *) (p :: k). GHC.Base.Monoid (f p) => GHC.Base.Monoid (GHC.Generics.Rec1 f p)
+ Data.Orphans: instance forall k (f :: k -> *) (p :: k). GHC.Base.Semigroup (f p) => GHC.Base.Semigroup (GHC.Generics.Rec1 f p)
+ Data.Orphans: instance forall k (p :: k). GHC.Base.Monoid (GHC.Generics.U1 p)
+ Data.Orphans: instance forall k (p :: k). GHC.Base.Semigroup (GHC.Generics.U1 p)
+ Data.Orphans: instance forall k (p :: k). GHC.Base.Semigroup (GHC.Generics.V1 p)
+ Data.Orphans: instance forall k c i (p :: k). GHC.Base.Monoid c => GHC.Base.Monoid (GHC.Generics.K1 i c p)
+ Data.Orphans: instance forall k c i (p :: k). GHC.Base.Semigroup c => GHC.Base.Semigroup (GHC.Generics.K1 i c p)
+ Data.Orphans: instance forall k1 k2 (f :: k2 -> *) (g :: k1 -> k2) (p :: k1). GHC.Base.Monoid (f (g p)) => GHC.Base.Monoid ((GHC.Generics.:.:) f g p)
+ Data.Orphans: instance forall k1 k2 (f :: k2 -> *) (g :: k1 -> k2) (p :: k1). GHC.Base.Semigroup (f (g p)) => GHC.Base.Semigroup ((GHC.Generics.:.:) f g p)

Files

CHANGES.markdown view
@@ -1,3 +1,13 @@+## Changes in 0.8 [2018.07.02]+ - Backported new instance from GHC 8.6/`base-4.12`+   * Data types in `GHC.Generics`:+     - `Applicative` instance for `K1`+     - `Semigroup` instances for `U1`, `Par1`, `Rec1`, `K1`, `M1`, `(:*:)`,     `(:.:)`, and `V1`+     - `Monoid`    instances for `U1`, `Par1`, `Rec1`, `K1`, `M1`, `(:*:)`, and `(:.:)`+   * `Foldable` and `Traversable` instances for `Data.Monoid.Alt`+   * `MonadFix`, `MonadZip`, `Data`, `Foldable`, `Traversable`, `Eq1`, `Ord1`,+     `Read1`, and `Show1` instances for `Data.Ord.Down`+ ## Changes in 0.7 [2018.03.08]  - Backported new instances from GHC 8.4/`base-4.11`    * `Alternative` instance for `ZipList`
README.markdown view
@@ -34,6 +34,10 @@  * `Alternative`, `MonadPlus`, and `MonadZip` instances for `Proxy`  * `Alternative`, `Applicative`, `Bounded`, `Data`, `Enum`, `Foldable`, `Functor`, `Ix`, `Monad`, `MonadFix`, `MonadPlus`, `MonadZip`, and `Traversable` instances for data types in `GHC.Generics`  * `Alternative`, `Eq`, `Ord`, `Read`, `Show`, `Foldable`, and `Traversable` instances for `ZipList`+ * `Applicative` instance for `K1` from `GHC.Generics`+ * `Applicative`, `Data`, `Eq1`, `Foldable`, `Functor`, `Ord1`, `Monad`,+   `MonadFix`, `MonadZip`, `Monoid`, `Num`, `Read`, `Read1`, `Semigroup`,+   `Show`, `Show1`, and `Traversable` instances for `Down`  * `Applicative` and `Alternative` instances for `ReadP` and `ReadPrec`  * `Applicative` instance for strict and lazy `ST`  * `Applicative`, `Foldable`, `Functor`, `Monad`, and `Traversable` instances for `Complex`,@@ -49,6 +53,7 @@  * `Eq`, `Ord`, `Read`, and `Show` instances for data types in `GHC.Generics`  * `Eq1`, `Ord1`, `Read1`, and `Show1` instances for `NonEmpty`  * `Foldable` instance for `Either`, `(,)` and `Const`+ * `Foldable` and `Traversable` instances for `Alt` from `Data.Monoid`  * `Functor` instance for `Handler`, `ArgOrder`, `OptDescr`, and `ArgDescr`  * `Functor`, `Applicative`, `Alternative`, and `MonadPlus` instances for `ArrowMonad`  * `Monad` instance for `(,)`@@ -59,8 +64,9 @@  * `Monoid` instances for `Identity` and `IO`  * `Num` instance for `Sum` and `Product`  * `Read` instance for `Fixed`- * `Applicative`, `Functor`, `Monad`, `Monoid`, `Num`, `Read`, `Semigroup`, and `Show` instances for `Down`  * `Semigroup` instances for `IO`, `Event` and `Lifetime`+ * `Semigroup` instances for `V1`, `U1`, `Par1`, `Rec1`, `K1`, `M1`, `(:*:)`, and `(:.:)` from `GHC.Generics`.+   `Monoid` instances for the same types (except `V1`).  * `Show` instance for `Fingerprint`  * `Storable` instance for `()`, `Complex`, and `Ratio`  * `Traversable` instance for `Either`, `(,)` and `Const`@@ -79,6 +85,9 @@  ## Supported versions of GHC/`base` + * `ghc-8.6.1`  / `base-4.12.0.0`+ * `ghc-8.4.3`  / `base-4.11.1.0`+ * `ghc-8.4.2`  / `base-4.11.1.0`  * `ghc-8.4.1`  / `base-4.11.0.0`  * `ghc-8.2.2`  / `base-4.10.1.0`  * `ghc-8.2.1`  / `base-4.10.0.0`
base-orphans.cabal view
@@ -1,11 +1,11 @@--- This file has been generated from package.yaml by hpack version 0.27.0.+-- This file has been generated from package.yaml by hpack version 0.28.2. -- -- see: https://github.com/sol/hpack ----- hash: 41c092a82fb1cbacf3f1eb99d4bdfbdae043e7a56b2a03706c9ea6ece36fda6f+-- hash: f7b54386bbe16442a11779267f4a728967659e625e63acc7a4a4a9d07cfd302f  name:                base-orphans-version:             0.7+version:             0.8 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. @base-orphans@ does not export anything except the orphan instances themselves and complements @<http://hackage.haskell.org/package/base-compat base-compat>@.                      See the README for what instances are covered: <https://github.com/haskell-compat/base-orphans#readme>. See also the <https://github.com/haskell-compat/base-orphans#what-is-not-covered what is not covered> section.@@ -25,8 +25,7 @@ license-file:        LICENSE build-type:          Simple cabal-version:       >= 1.10-tested-with:         GHC == 7.0.1,  GHC == 7.0.2,  GHC == 7.0.3,  GHC == 7.0.4 , GHC == 7.2.1,  GHC == 7.2.2 , GHC == 7.4.1,  GHC == 7.4.2 , GHC == 7.6.1,  GHC == 7.6.2,  GHC == 7.6.3 , GHC == 7.8.1,  GHC == 7.8.2,  GHC == 7.8.3,  GHC == 7.8.4 , GHC == 7.10.1, GHC == 7.10.2, GHC == 7.10.3 , GHC == 8.0.1,  GHC == 8.0.2 , GHC == 8.2.1,  GHC == 8.2.2 , GHC == 8.4.1-+tested-with:         GHC == 7.0.1,  GHC == 7.0.2,  GHC == 7.0.3,  GHC == 7.0.4 , GHC == 7.2.1,  GHC == 7.2.2 , GHC == 7.4.1,  GHC == 7.4.2 , GHC == 7.6.1,  GHC == 7.6.2,  GHC == 7.6.3 , GHC == 7.8.1,  GHC == 7.8.2,  GHC == 7.8.3,  GHC == 7.8.4 , GHC == 7.10.1, GHC == 7.10.2, GHC == 7.10.3 , GHC == 8.0.1,  GHC == 8.0.2 , GHC == 8.2.1,  GHC == 8.2.2 , GHC == 8.4.1,  GHC == 8.4.2,  GHC == 8.4.3 , GHC == 8.6.1 extra-source-files:     CHANGES.markdown     README.markdown
src/Data/Orphans.hs view
@@ -37,7 +37,7 @@ -} module Data.Orphans () where -#if __GLASGOW_HASKELL__ >= 701 && !(MIN_VERSION_base(4,9,0))+#if __GLASGOW_HASKELL__ >= 701 && !(MIN_VERSION_base(4,12,0)) import           GHC.Generics as Generics #endif @@ -46,9 +46,7 @@ #endif  #if !(MIN_VERSION_base(4,9,0))-import qualified Data.Foldable as F (Foldable(..))-import           Data.Monoid as Monoid-import qualified Data.Traversable as T (Traversable(..))+import qualified Data.Monoid as Monoid import           Text.ParserCombinators.ReadPrec as ReadPrec import           Text.Read as Read #endif@@ -65,6 +63,11 @@ import           Control.Monad.ST as Strict #endif +#if !(MIN_VERSION_base(4,12,0))+import qualified Data.Foldable as F (Foldable(..))+import qualified Data.Traversable as T (Traversable(..))+#endif+ #if __GLASGOW_HASKELL__ < 710 import           Control.Exception as Exception import           Control.Monad.ST.Lazy as Lazy@@ -77,7 +80,7 @@ # endif #endif -#if !(MIN_VERSION_base(4,11,0))+#if !(MIN_VERSION_base(4,12,0)) import           Data.Orphans.Prelude #endif @@ -1023,6 +1026,74 @@ # endif #endif +#if !(MIN_VERSION_base(4,12,0))+instance MonadFix Down where+    mfix f = Down (fix (getDown . f))+      where getDown (Down x) = x+deriving instance Data a => Data (Down a)+deriving instance F.Foldable Down+deriving instance T.Traversable Down+# if MIN_VERSION_base(4,4,0)+instance MonadZip Down where+    mzipWith = liftM2+# endif+# if MIN_VERSION_base(4,9,0)+instance Eq1 Down where+    liftEq eq (Down x) (Down y) = eq x y+instance Ord1 Down where+    liftCompare comp (Down x) (Down y) = comp x y+instance Read1 Down where+    liftReadsPrec rp _ = readsData $+         readsUnaryWith rp "Down" Down+instance Show1 Down where+    liftShowsPrec sp _ d (Down x) = showsUnaryWith sp "Down" d x+# endif++# if __GLASGOW_HASKELL__ >= 701+instance Monoid c => Applicative (K1 i c) where+  pure _ = K1 mempty+  (<*>) = coerce (mappend :: c -> c -> c)+#  if MIN_VERSION_base(4,10,0)+  liftA2 = \_ -> coerce (mappend :: c -> c -> c)+#  endif++instance Monoid (U1 p) where+  mempty = U1+#  if !(MIN_VERSION_base(4,11,0))+  _ `mappend` _ = U1+#  endif+deriving instance Monoid p => Monoid (Par1 p)+deriving instance Monoid (f p) => Monoid (Rec1 f p)+deriving instance Monoid c => Monoid (K1 i c p)+deriving instance Monoid (f p) => Monoid (M1 i c f p)+instance (Monoid (f p), Monoid (g p)) => Monoid ((f :*: g) p) where+  mempty = mempty :*: mempty+#  if !(MIN_VERSION_base(4,11,0))+  (x1 :*: y1) `mappend` (x2 :*: y2) = (x1 `mappend` x2) :*: (y1 `mappend` y2)+#  endif+deriving instance Monoid (f (g p)) => Monoid ((f :.: g) p)++#  if MIN_VERSION_base(4,9,0)+instance Semigroup (V1 p) where+  v <> _ = v+instance Semigroup (U1 p) where+  _ <> _ = U1+deriving instance Semigroup p => Semigroup (Par1 p)+deriving instance Semigroup (f p) => Semigroup (Rec1 f p)+deriving instance Semigroup c => Semigroup (K1 i c p)+deriving instance Semigroup (f p) => Semigroup (M1 i c f p)+instance (Semigroup (f p), Semigroup (g p)) => Semigroup ((f :*: g) p) where+  (x1 :*: y1) <> (x2 :*: y2) = (x1 <> x2) :*: (y1 <> y2)+deriving instance Semigroup (f (g p)) => Semigroup ((f :.: g) p)+#  endif+# endif++# if MIN_VERSION_base(4,8,0)+deriving instance Foldable f => Foldable (Alt f)+deriving instance Traversable f => Traversable (Alt f)+# endif+#endif+ #if __GLASGOW_HASKELL__ < 710 deriving instance Typeable  All deriving instance Typeable  AnnotationWrapper@@ -1043,6 +1114,7 @@ deriving instance Typeable  ConstrRep deriving instance Typeable  DataRep deriving instance Typeable  DataType+deriving instance Typeable1 Down deriving instance Typeable1 Dual deriving instance Typeable1 Endo deriving instance Typeable  Errno@@ -1198,7 +1270,6 @@  # if MIN_VERSION_base(4,6,0) deriving instance Typeable  CSigset-deriving instance Typeable1 Down deriving instance Typeable  ForeignPtrContents deriving instance Typeable  Nat deriving instance Typeable1 NoIO@@ -1485,7 +1556,7 @@ deriving instance Typeable 'AbsoluteSeek deriving instance Typeable 'All deriving instance Typeable 'AlreadyExists-deriving instance Typeable 'Any+deriving instance Typeable 'Monoid.Any deriving instance Typeable 'AppendHandle deriving instance Typeable 'AppendMode deriving instance Typeable 'BlockedIndefinitelyOnMVar
src/Data/Orphans/Prelude.hs view
@@ -15,7 +15,7 @@ Note that this module does not export any modules that could introduce name clashes. -} module Data.Orphans.Prelude-#if MIN_VERSION_base(4,11,0)+#if MIN_VERSION_base(4,12,0)     () where #else     (module OrphansPrelude, realPart, imagPart) where@@ -35,6 +35,12 @@ import Data.Int as OrphansPrelude import Data.Ix as OrphansPrelude import Data.List as OrphansPrelude (genericLength)+import Data.Monoid as OrphansPrelude+  hiding ( Any(..)+# if MIN_VERSION_base(4,5,0)+         , (<>)+# endif+         ) import Data.String as OrphansPrelude (IsString) import Data.Version as OrphansPrelude import Data.Word as OrphansPrelude@@ -116,7 +122,7 @@ # if MIN_VERSION_base(4,8,0) import Data.Bifunctor as OrphansPrelude import Data.Functor.Identity as OrphansPrelude-# endif+#endif  # if MIN_VERSION_base(4,9,0) import Data.Functor.Classes as OrphansPrelude