store 0.7.6 → 0.7.7
raw patch · 3 files changed
+38/−14 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +7/−0
- store.cabal +2/−2
- test/Data/StoreSpec.hs +29/−12
ChangeLog.md view
@@ -1,5 +1,12 @@ # ChangeLog +## 0.7.7++* Test now compiles with `smallcheck >= 1.2` and `base >= 4.14`.+ See [#153][].++[#153]: https://github.com/fpco/store/issues/153+ ## 0.7.6 * Now only depends on `fail` / `semigroups` shim for `ghc < 8`.
store.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 19b26b381091bd40e362dce289735df4bc966f0e954e173aa6096b741fb58e8d+-- hash: 0d992daa83559baa310905729749defd6734060ce7c1b6bdcebee8b782a81f0d name: store-version: 0.7.6+version: 0.7.7 synopsis: Fast binary serialization category: Serialization, Data homepage: https://github.com/fpco/store#readme
test/Data/StoreSpec.hs view
@@ -54,7 +54,6 @@ import qualified Data.Vector.Primitive as PV import qualified Data.Vector.Storable as SV import qualified Data.Vector.Unboxed as UV-import Data.Void (Void) import Data.Word import Foreign.C.Types import Foreign.Ptr@@ -63,7 +62,6 @@ import GHC.Generics import GHC.Real (Ratio(..)) import Language.Haskell.TH-import Language.Haskell.TH.ReifyMany import Language.Haskell.TH.Syntax import Network.Socket import Prelude@@ -73,6 +71,10 @@ import Test.SmallCheck.Series import TH.Utilities (unAppsT) +#if !MIN_VERSION_smallcheck(1,2,0)+import Data.Void (Void)+#endif+ ------------------------------------------------------------------------ -- Instances for base types @@ -93,22 +95,32 @@ minBound = 0 maxBound = 65535 -$(do let ns = [ ''CWchar, ''CUShort, ''CULong, ''CULLong, ''CIntMax+$(do let ns = [ ''PortNumber++#if !MIN_VERSION_smallcheck(1,2,0)+ , ''CWchar, ''CUShort, ''CULong, ''CULLong, ''CIntMax , ''CUIntMax, ''CPtrdiff, ''CSChar, ''CShort, ''CUInt, ''CLLong- , ''CLong, ''CInt, ''CChar, ''CSsize, ''CPid+ , ''CLong, ''CInt, ''CChar+#endif+ , ''CSsize, ''CPid , ''COff, ''CMode, ''CIno, ''CDev #if !MIN_VERSION_smallcheck(1,1,4) , ''Word8, ''Word16, ''Word32, ''Word64 , ''Int8, ''Int16, ''Int32, ''Int64 #endif- , ''PortNumber #if !MIN_VERSION_smallcheck(1,1,3) , ''Word #endif #if MIN_VERSION_base(4,10,0)- , ''CBool, ''CClockId, ''CKey, ''CId+#if !MIN_VERSION_smallcheck(1,2,0)+ , ''CBool+#endif+ , ''CClockId, ''CKey, ''CId , ''CBlkSize, ''CFsBlkCnt, ''CFsFilCnt, ''CBlkCnt #endif+#if MIN_VERSION_base(4,14,0)+ , ''CSocklen, ''CNfds+#endif #ifndef mingw32_HOST_OS , ''CUid, ''CTcflag, ''CRLim, ''CNlink, ''CGid #endif@@ -121,9 +133,12 @@ -- Serial instances for (Num a) types. Only really appropriate for the -- use here. -$(do let ns = [ ''CUSeconds, ''CClock, ''CTime, ''CUChar, ''CSize, ''CSigAtomic+$(do let ns =+#if !MIN_VERSION_smallcheck(1,2,0)+ [ ''CUSeconds, ''CClock, ''CTime, ''CUChar, ''CSize, ''CSigAtomic , ''CSUSeconds, ''CFloat, ''CDouble ] +++#endif #ifdef mingw32_HOST_OS [] #else@@ -212,8 +227,6 @@ instance (Monad m, Serial m a) => Serial m (Seq a) where series = fmap fromList series -instance (Monad m, Serial m a) => Serial m (Complex a) where- series = uncurry (:+) <$> (series >< series) instance (Monad m, Serial m a, UV.Unbox a) => Serial m (UV.Vector a) where series = fmap fromList series@@ -243,13 +256,17 @@ instance Monad m => Serial m Time.UTCTime where series = uncurry Time.UTCTime <$> (series >< series) -instance (Monad m, Serial m a) => Serial m (NE.NonEmpty a)- instance (Monad m, Serial m a) => Serial m (Tagged a) --- Should probably get added to smallcheck :)+#if !MIN_VERSION_smallcheck(1,2,0)+instance (Monad m, Serial m a) => Serial m (Complex a) where+ series = uncurry (:+) <$> (series >< series)++instance (Monad m, Serial m a) => Serial m (NE.NonEmpty a)+ instance Monad m => Serial m Void where series = generate (\_ -> [])+#endif -- We define our own Serial instance for 'Ratio' because of <https://github.com/feuerbach/smallcheck/pull/34>