packages feed

base-compat-batteries 0.13.0 → 0.13.1

raw patch · 5 files changed

+38/−54 lines, 5 filesdep ~base-compatPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base-compat

API changes (from Hackage documentation)

- Data.Functor.Compat: ($>) :: Functor f => f a -> b -> f b
- Data.Functor.Compat: (<$) :: Functor f => a -> f b -> f a
- Data.Functor.Compat: (<&>) :: Functor f => f a -> (a -> b) -> f b
- Data.Functor.Compat: class Functor (f :: Type -> Type)
- Data.Functor.Compat: fmap :: Functor f => (a -> b) -> f a -> f b
- Data.Functor.Compat: infixl 1 <&>
- Data.Functor.Compat: infixl 4 $>
- Data.Functor.Compat: void :: Functor f => f a -> f ()
+ Data.Tuple.Compat: getSolo :: Solo a -> a

Files

CHANGES.markdown view
@@ -1,3 +1,8 @@+## Changes in 0.13.1 [2023.10.11]+ - This coincides with the `base-compat-batteries-0.13.1` release. Refer to the+   [`base-compat-batteries` changelog](https://github.com/haskell-compat/base-compat/blob/master/base-compat-batteries/CHANGES.markdown#changes-in-0131-20231011)+   for more details.+ ## Changes in 0.13.0 [2023.03.10]  - This coincides with the `base-compat-0.13.0` release. Refer to the    [`base-compat` changelog](https://github.com/haskell-compat/base-compat/blob/master/base-compat/CHANGES.markdown#changes-in-0130-20230310)@@ -12,6 +17,9 @@  - Depend on `bifunctor-classes-compat` to backport the `Bifunctor`,    `Bifoldable`, and `Bitraversable` classes instead of the    `bifunctors` library, which has more dependencies.++## 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-batteries.cabal view
@@ -1,5 +1,5 @@ name:             base-compat-batteries-version:          0.13.0+version:          0.13.1 license:          MIT license-file:     LICENSE copyright:        (c) 2012-2018 Simon Hengel,@@ -35,6 +35,23 @@                   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+                  , GHC == 9.8.1  source-repository head   type: git@@ -48,7 +65,7 @@       Haskell2010   build-depends:       base        >= 4.3 && < 5,-      base-compat == 0.13.0,+      base-compat == 0.13.1,       ghc-prim   if !impl(ghc >= 7.8)     build-depends:
src/Data/Functor/Compat.hs view
@@ -1,51 +1,6 @@-{-# LANGUAGE CPP, NoImplicitPrelude #-}+{-# LANGUAGE CPP, NoImplicitPrelude, PackageImports #-} module Data.Functor.Compat (   module Base-, Functor(..)-, ($>)-, void-, (<&>) ) where-import Data.Functor as Base -#if !(MIN_VERSION_base(4,7,0))-import Control.Monad.Compat (void)-import Data.Function (flip)-#endif--#if !(MIN_VERSION_base(4,7,0))-infixl 4 $>---- | Flipped version of '$>'.------ /Since: 4.7.0.0/-($>) :: Functor f => f a -> b -> f b-($>) = flip (<$)-#endif--#if !(MIN_VERSION_base(4,11,0))--- | Flipped version of '<$>'.------ @--- ('<&>') = 'flip' 'fmap'--- @------ /Since: 4.11.0.0/------ ==== __Examples__--- Apply @(+1)@ to a list, a 'Data.Maybe.Just' and a 'Data.Either.Right':------ >>> Just 2 <&> (+1)--- Just 3------ >>> [1,2,3] <&> (+1)--- [2,3,4]------ >>> Right 3 <&> (+1)--- Right 4----(<&>) :: Functor f => f a -> (a -> b) -> f b-as <&> f = f <$> as--infixl 1 <&>-#endif+import "base-compat" Data.Functor.Compat as Base
src/Data/Tuple/Compat.hs view
@@ -22,6 +22,7 @@ #else     Solo(MkSolo) #endif+  , getSolo   , fst   , snd   , curry@@ -31,9 +32,12 @@  #if MIN_VERSION_ghc_prim(0,10,0) import "base-compat" Data.Tuple.Compat-#elif MIN_VERSION_ghc_prim(0,7,0)+#elif MIN_VERSION_ghc_prim(0,8,0) import "base-compat" Data.Tuple.Compat import "OneTuple" Data.Tuple.Solo (pattern MkSolo)+#elif MIN_VERSION_ghc_prim(0,7,0)+import "base-compat" Data.Tuple.Compat+import "OneTuple" Data.Tuple.Solo (pattern MkSolo, getSolo) #else import "base" Data.Tuple import "OneTuple" Data.Tuple.Solo
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"