packages feed

base-compat-batteries 0.12.2 → 0.12.3

raw patch · 5 files changed

+71/−9 lines, 5 filesdep ~OneTupledep ~base-compatPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: OneTuple, base-compat

API changes (from Hackage documentation)

- Data.Tuple.Compat: [getSolo] :: Solo a -> a
- Control.Monad.Compat: infixl 1 >>
+ Control.Monad.Compat: infixl 1 >>=
- Data.Type.Equality.Compat: [HRefl] :: forall k1 (a :: k1). a :~~: a
+ Data.Type.Equality.Compat: [HRefl] :: forall {k1} (a :: k1). a :~~: a
- Data.Type.Equality.Compat: [Refl] :: forall k (a :: k). a :~: a
+ Data.Type.Equality.Compat: [Refl] :: forall {k} (a :: k). a :~: a
- Data.Type.Equality.Compat: apply :: forall k1 k2 (f :: k1 -> k2) (g :: k1 -> k2) (a :: k1) (b :: k1). (f :~: g) -> (a :~: b) -> f a :~: g b
+ Data.Type.Equality.Compat: apply :: forall {k1} {k2} (f :: k1 -> k2) (g :: k1 -> k2) (a :: k1) (b :: k1). (f :~: g) -> (a :~: b) -> f a :~: g b
- Data.Type.Equality.Compat: gcastWith :: forall k (a :: k) (b :: k) r. (a :~: b) -> (a ~ b => r) -> r
+ Data.Type.Equality.Compat: gcastWith :: forall {k} (a :: k) (b :: k) r. (a :~: b) -> (a ~ b => r) -> r
- Data.Type.Equality.Compat: inner :: forall k1 k2 (f :: k1 -> k2) (a :: k1) (g :: k1 -> k2) (b :: k1). (f a :~: g b) -> a :~: b
+ Data.Type.Equality.Compat: inner :: forall {k1} {k2} (f :: k1 -> k2) (a :: k1) (g :: k1 -> k2) (b :: k1). (f a :~: g b) -> a :~: b
- Data.Type.Equality.Compat: outer :: forall k1 k2 (f :: k1 -> k2) (a :: k1) (g :: k1 -> k2) (b :: k1). (f a :~: g b) -> f :~: g
+ Data.Type.Equality.Compat: outer :: forall {k1} {k2} (f :: k1 -> k2) (a :: k1) (g :: k1 -> k2) (b :: k1). (f a :~: g b) -> f :~: g
- Data.Type.Equality.Compat: sym :: forall k (a :: k) (b :: k). (a :~: b) -> b :~: a
+ Data.Type.Equality.Compat: sym :: forall {k} (a :: k) (b :: k). (a :~: b) -> b :~: a
- Data.Type.Equality.Compat: trans :: forall k (a :: k) (b :: k) (c :: k). (a :~: b) -> (b :~: c) -> a :~: c
+ Data.Type.Equality.Compat: trans :: forall {k} (a :: k) (b :: k) (c :: k). (a :~: b) -> (b :~: c) -> a :~: c

Files

CHANGES.markdown view
@@ -1,3 +1,6 @@+## Changes in 0.12.3 [2023.07.12]+ - Allow building with `OneTuple-0.4.*`.+ ## Changes in 0.12.2 [2022.08.11]  - This coincides with the `base-compat-0.12.2` release. Refer to the    [`base-compat` changelog](https://github.com/haskell-compat/base-compat/blob/master/base-compat/CHANGES.markdown#changes-in-0122-20220811)
base-compat-batteries.cabal view
@@ -1,5 +1,5 @@ name:             base-compat-batteries-version:          0.12.2+version:          0.12.3 license:          MIT license-file:     LICENSE copyright:        (c) 2012-2018 Simon Hengel,@@ -35,6 +35,22 @@                   for a more comprehensive list of differences between                   @base-compat@ and @base-compat-batteries@. extra-source-files: CHANGES.markdown, README.markdown+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.5+                  , GHC == 9.6.2  source-repository head   type: git@@ -48,7 +64,7 @@       Haskell2010   build-depends:       base        >= 4.3 && < 5,-      base-compat == 0.12.2,+      base-compat == 0.12.3,       ghc-prim   if !impl(ghc >= 7.8)     build-depends:@@ -72,7 +88,17 @@       contravariant >= 1.5 && < 1.6   if !impl(ghc >= 9.0)     build-depends:-      OneTuple >= 0.3 && < 0.4+      OneTuple >= 0.3 && < 0.5++    -- We want to consistently use `Solo` as the name of the data constructor+    -- for the base-compat-0.12.* series when building with a pre-9.6 version+    -- of GHC. This is only possible on pre-7.8 versions of GHC (which do not+    -- support pattern synonyms) with OneTuple-0.3.*, which defines a `Solo`+    -- data constructor. (In OneTuple-0.4.* and later, the data constructor is+    -- instead named `MkSolo`.)+    if !impl(ghc >= 7.8)+      build-depends:+        OneTuple == 0.3.*   ghc-options:       -fno-warn-duplicate-exports   if impl(ghc >= 7.10)@@ -240,6 +266,7 @@       -- Other tests       SafeHaskellSpec       TestHspecTrustworthy+      T91Spec   build-depends:       base >= 4.3 && < 5     , base-compat-batteries
src/Data/Tuple/Compat.hs view
@@ -1,6 +1,23 @@ {-# LANGUAGE CPP, NoImplicitPrelude, PackageImports #-}+#if __GLASGOW_HASKELL__ >= 708+{-# LANGUAGE PatternSynonyms #-}+#endif module Data.Tuple.Compat-  ( Solo (..)+  (+#if MIN_VERSION_ghc_prim(0,10,0)+    Solo(MkSolo, Solo)+#elif __GLASGOW_HASKELL__ >= 708 && \+      __GLASGOW_HASKELL__ < 800 && \+      defined(MIN_VERSION_OneTuple)+# if MIN_VERSION_OneTuple(0,4,0)+    Solo+  , pattern Solo+# else+    Solo(Solo)+# endif+#else+    Solo(Solo)+#endif   , fst   , snd   , curry@@ -12,5 +29,5 @@ import "base-compat" Data.Tuple.Compat #else import "base" Data.Tuple-import "OneTuple" Data.Tuple.Solo (Solo(..))+import "OneTuple" Data.Tuple.Solo #endif
test/System/Environment/CompatSpec.hs view
@@ -2,7 +2,7 @@ module System.Environment.CompatSpec (main, spec) where  import           Test.Hspec-#if __GLASGOW_HASKELL__ >= 702+#if __GLASGOW_HASKELL__ >= 704 import           Test.QuickCheck #endif @@ -56,7 +56,7 @@     it "throws an exception if key contains '='" $ do       unsetEnv "some=key" `shouldThrow` (== InvalidArgument) . ioeGetErrorType -#if __GLASGOW_HASKELL__ >= 702+#if __GLASGOW_HASKELL__ >= 704     it "works for arbitrary keys" $       property $ \k -> ('\NUL' `notElem` k && '=' `notElem` k && (not . null) k) ==> do         setEnv k "foo"@@ -96,7 +96,7 @@       setEnv "FOO\NULBAR" "foo"       getEnv "FOO" `shouldReturn` "foo" -#if __GLASGOW_HASKELL__ >= 702+#if __GLASGOW_HASKELL__ >= 704     it "works for unicode" $ do       unsetEnv "FOO"       setEnv "FOO" "foo-\955-bar"@@ -118,7 +118,7 @@     it "throws an exception if key contains '='" $ do       setEnv "some=key" "foo" `shouldThrow` (== InvalidArgument) . ioeGetErrorType -#if __GLASGOW_HASKELL__ >= 702+#if __GLASGOW_HASKELL__ >= 704     it "works for arbitrary keys" $       property $ \k -> ('\NUL' `notElem` k && '=' `notElem` k && (not . null) k) ==> do         setEnv k "foo"
+ test/T91Spec.hs view
@@ -0,0 +1,15 @@+{-# OPTIONS_GHC -fno-warn-deprecations #-}+-- | A regression test for https://github.com/haskell-compat/base-compat/issues/91.+module T91Spec (main, spec) where++import Data.Tuple.Compat+import Test.Hspec (Expectation, Spec, describe, hspec, it)++main :: IO ()+main = hspec spec++spec :: Spec+spec =+  describe "Solo data constructor" $+    it "is always available" $ do+      Solo () `seq` return () :: Expectation