Hello community,

here is the log from the commit of package ghc-basement for openSUSE:Factory 
checked in at 2019-02-17 12:19:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-basement (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-basement.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-basement"

Sun Feb 17 12:19:53 2019 rev:5 rq:674295 version:0.0.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-basement/ghc-basement.changes        
2018-10-25 08:22:43.139901240 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-basement.new.28833/ghc-basement.changes     
2019-02-17 12:19:56.316223692 +0100
@@ -1,0 +2,6 @@
+Thu Feb  7 13:49:04 UTC 2019 - psim...@suse.com
+
+- Update basement to version 0.0.10.
+  Upstream does not provide a change log file.
+
+-------------------------------------------------------------------

Old:
----
  basement-0.0.8.tar.gz

New:
----
  basement-0.0.10.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-basement.spec ++++++
--- /var/tmp/diff_new_pack.iPymZB/_old  2019-02-17 12:19:56.776223566 +0100
+++ /var/tmp/diff_new_pack.iPymZB/_new  2019-02-17 12:19:56.776223566 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-basement
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %global pkg_name basement
 Name:           ghc-%{pkg_name}
-Version:        0.0.8
+Version:        0.0.10
 Release:        0
 Summary:        Foundation scrap box of array & string
 License:        BSD-3-Clause

++++++ basement-0.0.8.tar.gz -> basement-0.0.10.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/basement-0.0.8/Basement/Bits.hs 
new/basement-0.0.10/Basement/Bits.hs
--- old/basement-0.0.8/Basement/Bits.hs 2018-02-23 20:15:54.000000000 +0100
+++ new/basement-0.0.10/Basement/Bits.hs        2019-02-06 07:37:11.000000000 
+0100
@@ -24,7 +24,6 @@
 module Basement.Bits
     ( BitOps(..)
     , FiniteBitsOps(..)
-
     , Bits
     , toBits
     , allOne
@@ -57,7 +56,7 @@
 import GHC.IntWord64
 #endif
 
--- | operation over finit bits
+-- | operation over finite bits
 class FiniteBitsOps bits where
     -- | get the number of bits in the given object
     --
@@ -123,6 +122,11 @@
     default clearBit :: FiniteBitsOps bits => bits -> Offset Bool -> bits
     clearBit x n = x .&. (bitFlip (bit n))
 
+infixl 8 .<<., .>>., `rotateL`, `rotateR`
+infixl 7 .&.
+infixl 6 .^.
+infixl 5 .|.
+
 -- | Bool set of 'n' bits.
 --
 newtype Bits (n :: Nat) = Bits { bitsToNatural :: Natural }
@@ -162,6 +166,7 @@
 instance SizeValid n => Additive (Bits n) where
     azero = Bits 0
     (+) (Bits a) (Bits b) = toBits (a + b)
+    scale n (Bits a) = toBits (scale n a)
 instance SizeValid n => Subtractive (Bits n) where
     type Difference (Bits n) = Bits n
     (-) (Bits a) (Bits b) = maybe azero toBits (a - b)
@@ -310,6 +315,57 @@
     (W32# x#) .<<. (CountOf (I# i#)) = W32# (narrow32Word# (x# `shiftL#` i#))
     (W32# x#) .>>. (CountOf (I# i#)) = W32# (narrow32Word# (x# `shiftRL#` i#))
 
+-- Word ---------------------------------------------------------------------
+
+#if WORD_SIZE_IN_BITS == 64
+instance FiniteBitsOps Word where
+    numberOfBits _ = 64
+    rotateL (W# x#) (CountOf (I# i#))
+        | isTrue# (i'# ==# 0#) = W# x#
+        | otherwise  = W# ((x# `uncheckedShiftL#` i'#) `or#`
+                           (x# `uncheckedShiftRL#` (64# -# i'#)))
+      where
+        !i'# = word2Int# (int2Word# i# `and#` 63##)
+    rotateR (W# x#) (CountOf (I# i#))
+        | isTrue# (i'# ==# 0#) = W# x#
+        | otherwise  = W# ((x# `uncheckedShiftRL#` i'#) `or#`
+                           (x# `uncheckedShiftL#` (64# -# i'#)))
+      where
+        !i'# = word2Int# (int2Word# i# `and#` 63##)
+    bitFlip (W# x#) = W# (x# `xor#` mb#)
+        where !(W# mb#) = maxBound
+    popCount (W# x#) = CountOf $ wordToInt (W# (popCnt64# x#))
+    countLeadingZeros (W# w#) = CountOf $ wordToInt (W# (clz64# w#))
+    countTrailingZeros (W# w#) = CountOf $ wordToInt (W# (ctz64# w#))
+#else
+instance FiniteBitsOps Word where
+    numberOfBits _ = 32
+    rotateL (W# x#) (CountOf (I# i#))
+        | isTrue# (i'# ==# 0#) = W# x#
+        | otherwise  = W# ((x# `uncheckedShiftL#` i'#) `or#`
+                           (x# `uncheckedShiftRL#` (32# -# i'#)))
+      where
+        !i'# = word2Int# (int2Word# i# `and#` 31##)
+    rotateR (W# x#) (CountOf (I# i#))
+        | isTrue# (i'# ==# 0#) = W# x#
+        | otherwise  = W# ((x# `uncheckedShiftRL#` i'#) `or#`
+                           (x# `uncheckedShiftL#` (32# -# i'#)))
+      where
+        !i'# = word2Int# (int2Word# i# `and#` 31##)
+    bitFlip (W# x#) = W# (x# `xor#` mb#)
+        where !(W# mb#) = maxBound
+    popCount (W# x#) = CountOf $ wordToInt (W# (popCnt32# x#))
+    countLeadingZeros (W# w#) = CountOf $ wordToInt (W# (clz32# w#))
+    countTrailingZeros (W# w#) = CountOf $ wordToInt (W# (ctz32# w#))
+#endif
+
+instance BitOps Word where
+    (W# x#) .&. (W# y#)   = W# (x# `and#` y#)
+    (W# x#) .|. (W# y#)   = W# (x# `or#`  y#)
+    (W# x#) .^. (W# y#)   = W# (x# `xor#` y#)
+    (W# x#) .<<. (CountOf (I# i#)) = W# ((x# `shiftL#` i#))
+    (W# x#) .>>. (CountOf (I# i#)) = W# ((x# `shiftRL#` i#))
+
 -- Word64 ---------------------------------------------------------------------
 
 #if WORD_SIZE_IN_BITS == 64
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/basement-0.0.8/Basement/Block/Base.hs 
new/basement-0.0.10/Basement/Block/Base.hs
--- old/basement-0.0.8/Basement/Block/Base.hs   2018-02-12 15:24:12.000000000 
+0100
+++ new/basement-0.0.10/Basement/Block/Base.hs  2019-01-09 12:14:46.000000000 
+0100
@@ -265,8 +265,8 @@
 
 unsafeShrink :: PrimMonad prim => MutableBlock ty (PrimState prim) -> CountOf 
ty -> prim (MutableBlock ty (PrimState prim))
 unsafeShrink (MutableBlock mba) (CountOf (I# nsz)) = primitive $ \s ->
-    case compatShrinkMutableByteArray# mba nsz s of
-        (# s, mba' #) -> (# s, MutableBlock mba' #)
+    case shrinkMutableByteArray# mba nsz s of
+        s -> (# s, MutableBlock mba #)
 
 -- | Thaw an immutable block.
 --
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/basement-0.0.8/Basement/Block/Mutable.hs 
new/basement-0.0.10/Basement/Block/Mutable.hs
--- old/basement-0.0.8/Basement/Block/Mutable.hs        2018-01-14 
13:55:26.000000000 +0100
+++ new/basement-0.0.10/Basement/Block/Mutable.hs       2019-01-09 
12:14:46.000000000 +0100
@@ -67,7 +67,6 @@
 import           GHC.Prim
 import           GHC.Types
 import           Basement.Compat.Base
-import           Basement.Compat.Primitive (compatCopyByteArrayToAddr#)
 import           Data.Proxy
 import           Basement.Exception
 import           Basement.Types.OffsetSize
@@ -147,7 +146,7 @@
     | srcEnd > sizeAsOffset arrSz = primOutOfBound OOB_MemCopy srcEnd arrSz
     | otherwise                = do
         (Block ba) <- unsafeFreeze mb
-        primitive $ \s1 -> (# compatCopyByteArrayToAddr# ba os# dst# szBytes# 
s1, () #)
+        primitive $ \s1 -> (# copyByteArrayToAddr# ba os# dst# szBytes# s1, () 
#)
   where
     srcEnd = os `offsetPlusE` arrSz
     !os@(Offset (I# os#)) = offsetInBytes ofs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/basement-0.0.8/Basement/Block.hs 
new/basement-0.0.10/Basement/Block.hs
--- old/basement-0.0.8/Basement/Block.hs        2018-02-04 11:47:59.000000000 
+0100
+++ new/basement-0.0.10/Basement/Block.hs       2019-01-09 12:14:46.000000000 
+0100
@@ -107,7 +107,7 @@
                 -> Ptr ty   -- ^ The destination address where the copy is 
going to start
                 -> prim ()
 unsafeCopyToPtr (Block blk) (Ptr p) = primitive $ \s1 ->
-    (# compatCopyByteArrayToAddr# blk 0# p (sizeofByteArray# blk) s1, () #)
+    (# copyByteArrayToAddr# blk 0# p (sizeofByteArray# blk) s1, () #)
 
 -- | Create a new array of size @n by settings each cells through the
 -- function @f.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/basement-0.0.8/Basement/Bounded.hs 
new/basement-0.0.10/Basement/Bounded.hs
--- old/basement-0.0.8/Basement/Bounded.hs      2017-11-11 10:52:31.000000000 
+0100
+++ new/basement-0.0.10/Basement/Bounded.hs     2019-01-09 12:14:46.000000000 
+0100
@@ -26,6 +26,7 @@
 import           Data.Word
 import           Basement.Compat.Base
 import           Basement.Compat.Natural
+import           Basement.Numerical.Number
 import           Data.Proxy
 import           Basement.Nat
 import qualified Prelude
@@ -43,6 +44,15 @@
     negate _ = error "cannot negate Zn64: use Foundation Numerical hierarchy 
for this function to not be exposed to Zn64"
     signum (Zn64 a) = Zn64 (Prelude.signum a)
 
+type instance NatNumMaxBound (Zn64 n) = n
+
+instance (KnownNat n, NatWithinBound Word64 n) => Integral (Zn64 n) where
+    fromInteger = zn64 . Prelude.fromInteger
+instance (KnownNat n, NatWithinBound Word64 n) => IsIntegral (Zn64 n) where
+    toInteger (Zn64 n) = toInteger n
+instance (KnownNat n, NatWithinBound Word64 n) => IsNatural (Zn64 (n :: Nat)) 
where
+    toNatural (Zn64 n) = toNatural n
+
 -- | Create an element of ℤ/nℤ from a Word64
 --
 -- If the value is greater than n, then the value is normalized by using the
@@ -81,6 +91,15 @@
     negate _ = error "cannot negate Zn: use Foundation Numerical hierarchy for 
this function to not be exposed to Zn"
     signum = Zn . Prelude.signum . unZn
 
+type instance NatNumMaxBound (Zn n) = n
+
+instance KnownNat n => Integral (Zn n) where
+    fromInteger = zn . Prelude.fromInteger
+instance KnownNat n => IsIntegral (Zn n) where
+    toInteger (Zn n) = toInteger n
+instance KnownNat n => IsNatural (Zn n) where
+    toNatural i = unZn i
+
 -- | Create an element of ℤ/nℤ from a Natural.
 --
 -- If the value is greater than n, then the value is normalized by using the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/basement-0.0.8/Basement/Compat/Primitive.hs 
new/basement-0.0.10/Basement/Compat/Primitive.hs
--- old/basement-0.0.8/Basement/Compat/Primitive.hs     2018-02-04 
11:47:59.000000000 +0100
+++ new/basement-0.0.10/Basement/Compat/Primitive.hs    2019-02-04 
06:56:19.000000000 +0100
@@ -12,14 +12,7 @@
 module Basement.Compat.Primitive
     ( bool#
     , PinnedStatus(..), toPinnedStatus#
-    , compatAndI#
-    , compatQuotRemInt#
-    , compatCopyAddrToByteArray#
-    , compatCopyByteArrayToAddr#
     , compatMkWeak#
-    , compatGetSizeofMutableByteArray#
-    , compatShrinkMutableByteArray#
-    , compatResizeMutableByteArray#
     , compatIsByteArrayPinned#
     , compatIsMutableByteArrayPinned#
     , Word(..)
@@ -29,17 +22,21 @@
 import           GHC.Exts
 import           GHC.Prim
 import           GHC.Word
-#if __GLASGOW_HASKELL__ >= 800
 import           GHC.IO
-#endif
 
 import           Basement.Compat.PrimTypes
 
+--  GHC 8.6  | Base 4.12
+--  GHC 8.4  | Base 4.11
+--  GHC 8.2  | Base 4.10
 --  GHC 8.0  | Base 4.9
 --  GHC 7.10 | Base 4.8
 --  GHC 7.8  | Base 4.7
 --  GHC 7.6  | Base 4.6
 --  GHC 7.4  | Base 4.5
+--
+--  More complete list:
+--  https://wiki.haskell.org/Base_package
 
 -- | Flag record whether a specific byte array is pinned or not
 data PinnedStatus = Pinned | Unpinned
@@ -50,66 +47,10 @@
 toPinnedStatus# _  = Pinned
 
 -- | turn an Int# into a Bool
---
--- Since GHC 7.8, boolean primitive don't return Bool but Int#.
-#if MIN_VERSION_base(4,7,0)
 bool# :: Int# -> Prelude.Bool
 bool# v = isTrue# v
-#else
-bool# :: Prelude.Bool -> Prelude.Bool
-bool# v = v
-#endif
 {-# INLINE bool# #-}
 
--- | A version friendly of andI#
-compatAndI# :: Int# -> Int# -> Int#
-#if !MIN_VERSION_base(4,7,0)
-compatAndI# a b = word2Int# (and# (int2Word# a) (int2Word# b))
-#else
-compatAndI# = andI#
-#endif
-{-# INLINE compatAndI# #-}
-
--- | A version friendly of quotRemInt#
-compatQuotRemInt# :: Int# -> Int# -> (# Int#, Int# #)
-compatQuotRemInt# = quotRemInt#
-{-# INLINE compatQuotRemInt# #-}
-
--- | A version friendly fo copyAddrToByteArray#
---
--- only available from GHC 7.8
-compatCopyAddrToByteArray# :: Addr# -> MutableByteArray# s -> Int# -> Int# -> 
State# s -> State# s
-#if MIN_VERSION_base(4,7,0)
-compatCopyAddrToByteArray# = copyAddrToByteArray#
-#else
-compatCopyAddrToByteArray# addr ba ofs sz stini =
-    loop ofs 0# stini
-  where
-    loop o i st
-        | bool# (i ==# sz)  = st
-        | Prelude.otherwise =
-            case readWord8OffAddr# addr i st of
-                (# st2, w #) -> loop (o +# 1#) (i +# 1#) (writeWord8Array# ba 
o w st2)
-#endif
-{-# INLINE compatCopyAddrToByteArray# #-}
-
--- | A version friendly fo copyByteArrayToAddr#
---
--- only available from GHC 7.8
-compatCopyByteArrayToAddr# :: ByteArray# -> Int# -> Addr# -> Int# -> State# s 
-> State# s
-#if MIN_VERSION_base(4,7,0)
-compatCopyByteArrayToAddr# = copyByteArrayToAddr#
-#else
-compatCopyByteArrayToAddr# ba ofs addr sz stini =
-    loop ofs 0# stini
-  where
-    loop o i st
-        | bool# (i ==# sz)  = st
-        | Prelude.otherwise =
-            loop (o +# 1#) (i +# 1#) (writeWord8OffAddr# addr i 
(indexWord8Array# ba o) st)
-#endif
-{-# INLINE compatCopyByteArrayToAddr# #-}
-
 -- | A mkWeak# version that keep working on 8.0
 --
 -- signature change in ghc-prim:
@@ -117,50 +58,9 @@
 -- * 0.5 :mkWeak# :: o -> b -> (State# RealWorld -> (#State# RealWorld, c#)) 
-> State# RealWorld -> (#State# RealWorld, Weak# b#)
 --
 compatMkWeak# :: o -> b -> Prelude.IO () -> State# RealWorld -> (#State# 
RealWorld, Weak# b #)
-#if __GLASGOW_HASKELL__ >= 800
 compatMkWeak# o b c s = mkWeak# o b (case c of { IO f -> f }) s
-#else
-compatMkWeak# o b c s = mkWeak# o b c s
-#endif
 {-# INLINE compatMkWeak# #-}
 
-compatGetSizeofMutableByteArray# :: MutableByteArray# s -> State# s -> 
(#State# s, Int# #)
-#if __GLASGOW_HASKELL__ >= 800
-compatGetSizeofMutableByteArray# mba s = getSizeofMutableByteArray# mba s
-#else
-compatGetSizeofMutableByteArray# mba s = (# s, sizeofMutableByteArray# mba #)
-#endif
-{-# INLINE compatGetSizeofMutableByteArray# #-}
-
-compatShrinkMutableByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# 
State# s, MutableByteArray# s #)
-#if __GLASGOW_HASKELL__ >= 800
-compatShrinkMutableByteArray# mba i s =
-    case shrinkMutableByteArray# mba i s of { s2 -> (# s2, mba #) }
-#else
-compatShrinkMutableByteArray# src i s =
-    -- not check whether i is smaller than the size of the buffer
-    case newAlignedPinnedByteArray# i 8# s of { (# s2, dst #) ->
-    case copyMutableByteArray# src 0# dst 0# i s2 of { s3 -> (# s3, dst #) }}
-#endif
-{-# INLINE compatShrinkMutableByteArray# #-}
-
---shrinkMutableByteArray# :: MutableByteArray# s -> Int# -> State# s -> State# 
s
-compatResizeMutableByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# 
State# s, MutableByteArray# s #)
-#if __GLASGOW_HASKELL__ >= 800
-compatResizeMutableByteArray# mba i s = resizeMutableByteArray# mba i s
-#else
-compatResizeMutableByteArray# src i s =
-    case newAlignedPinnedByteArray# i 8# s of { (# s2, dst #) ->
-    case copyMutableByteArray# src 0# dst 0# nbBytes s2 of { s3 -> (# s3, dst 
#) }}
-  where
-    isGrow = bool# (i ># len)
-    nbBytes
-        | isGrow            = len
-        | Prelude.otherwise = i
-    !len = sizeofMutableByteArray# src
-#endif
-{-# INLINE compatResizeMutableByteArray# #-}
-
 #if __GLASGOW_HASKELL__ >= 802
 compatIsByteArrayPinned# :: ByteArray# -> Pinned#
 compatIsByteArrayPinned# ba = isByteArrayPinned# ba
@@ -168,9 +68,9 @@
 compatIsMutableByteArrayPinned# :: MutableByteArray# s -> Pinned#
 compatIsMutableByteArrayPinned# ba = isMutableByteArrayPinned# ba
 #else
-foreign import ccall unsafe "foundation_is_bytearray_pinned"
+foreign import ccall unsafe "basement_is_bytearray_pinned"
     compatIsByteArrayPinned# :: ByteArray# -> Pinned#
 
-foreign import ccall unsafe "foundation_is_bytearray_pinned"
+foreign import ccall unsafe "basement_is_bytearray_pinned"
     compatIsMutableByteArrayPinned# :: MutableByteArray# s -> Pinned#
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/basement-0.0.8/Basement/From.hs 
new/basement-0.0.10/Basement/From.hs
--- old/basement-0.0.8/Basement/From.hs 2018-02-12 15:24:12.000000000 +0100
+++ new/basement-0.0.10/Basement/From.hs        2019-02-04 06:49:59.000000000 
+0100
@@ -213,6 +213,9 @@
     from (Left a) = This a
     from (Right b) = That b
 
+instance From Word128 Word256 where
+    from (Word128 a b) = Word256 0 0 a b
+
 -- basement instances
 
 -- uarrays
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/basement-0.0.8/Basement/Numerical/Additive.hs 
new/basement-0.0.10/Basement/Numerical/Additive.hs
--- old/basement-0.0.8/Basement/Numerical/Additive.hs   2018-01-08 
09:39:24.000000000 +0100
+++ new/basement-0.0.10/Basement/Numerical/Additive.hs  2019-01-09 
12:14:46.000000000 +0100
@@ -1,6 +1,7 @@
 {-# LANGUAGE CPP               #-}
 {-# LANGUAGE MagicHash         #-}
 {-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE DefaultSignatures #-}
 {-# OPTIONS_GHC -fno-prof-auto #-}
 module Basement.Numerical.Additive
     ( Additive(..)
@@ -41,10 +42,14 @@
     (+)   :: a -> a -> a -- the addition
 
     scale :: IsNatural n => n -> a -> a -- scale: repeated addition
-    scale 0 _ = azero
-    scale 1 a = a
-    scale 2 a = a + a
-    scale n a = a + scale (pred n) a -- TODO optimise. define by group of 2.
+    default scale :: (Enum n, IsNatural n) => n -> a -> a
+    scale = scaleEnum
+
+scaleEnum :: (Enum n, IsNatural n, Additive a) => n -> a -> a
+scaleEnum 0 _ = azero
+scaleEnum 1 a = a
+scaleEnum 2 a = a + a
+scaleEnum n a = a + scaleEnum (pred n) a -- TODO optimise. define by group of 
2.
 
 infixl 6 +
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/basement-0.0.8/Basement/Numerical/Multiplicative.hs 
new/basement-0.0.10/Basement/Numerical/Multiplicative.hs
--- old/basement-0.0.8/Basement/Numerical/Multiplicative.hs     2018-01-08 
09:39:24.000000000 +0100
+++ new/basement-0.0.10/Basement/Numerical/Multiplicative.hs    2019-01-09 
12:14:46.000000000 +0100
@@ -1,5 +1,6 @@
 {-# LANGUAGE FlexibleInstances #-}
 {-# LANGUAGE TypeSynonymInstances #-}
+{-# LANGUAGE DefaultSignatures #-}
 module Basement.Numerical.Multiplicative
     ( Multiplicative(..)
     , IDivisible(..)
@@ -10,6 +11,7 @@
 import           Basement.Compat.Base
 import           Basement.Compat.C.Types
 import           Basement.Compat.Natural
+import           Basement.Compat.NumLiteral
 import           Basement.Numerical.Number
 import           Basement.Numerical.Additive
 import           Basement.Types.Word128 (Word128)
@@ -35,8 +37,7 @@
     -- > a ^ 2 = a * a
     -- > a ^ 10 = (a ^ 5) * (a ^ 5) ..
     --(^) :: (IsNatural n) => a -> n -> a
-    (^) :: (IsNatural n, IDivisible n) => a -> n -> a
-    -- default (^) :: (IDivisible n, IsNatural n, Multiplicative a) => a -> n 
-> a
+    (^) :: (IsNatural n, Enum n, IDivisible n) => a -> n -> a
     (^) = power
 
 -- | Represent types that supports an euclidian division
@@ -310,7 +311,7 @@
 recip :: Divisible a => a -> a
 recip x = midentity / x
 
-power :: (IsNatural n, IDivisible n, Multiplicative a) => a -> n -> a
+power :: (Enum n, IsNatural n, IDivisible n, Multiplicative a) => a -> n -> a
 power a n
     | n == 0    = midentity
     | otherwise = squaring midentity a n
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/basement-0.0.8/Basement/Numerical/Number.hs 
new/basement-0.0.10/Basement/Numerical/Number.hs
--- old/basement-0.0.8/Basement/Numerical/Number.hs     2018-01-08 
09:39:24.000000000 +0100
+++ new/basement-0.0.10/Basement/Numerical/Number.hs    2019-01-09 
12:14:46.000000000 +0100
@@ -7,6 +7,7 @@
 import           Basement.Compat.Base
 import           Basement.Compat.C.Types
 import           Basement.Compat.Natural
+import           Basement.Compat.NumLiteral
 import           Data.Bits
 import qualified Prelude
 
@@ -14,12 +15,12 @@
 --
 -- all number are Enum'erable, meaning that you can move to
 -- next element
-class (Enum a, Eq a, Ord a, Integral a) => IsIntegral a where
+class (Integral a, Eq a, Ord a) => IsIntegral a where
     {-# MINIMAL toInteger #-}
     toInteger :: a -> Integer
 
 -- | Non Negative Number literals, convertible through the generic Natural type
-class (Enum a, Eq a, Ord a, Integral a, IsIntegral a) => IsNatural a where
+class IsIntegral a => IsNatural a where
     {-# MINIMAL toNatural #-}
     toNatural :: a -> Natural
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/basement-0.0.8/Basement/Types/OffsetSize.hs 
new/basement-0.0.10/Basement/Types/OffsetSize.hs
--- old/basement-0.0.8/Basement/Types/OffsetSize.hs     2018-02-04 
11:47:59.000000000 +0100
+++ new/basement-0.0.10/Basement/Types/OffsetSize.hs    2019-01-09 
12:14:46.000000000 +0100
@@ -197,6 +197,7 @@
 instance Additive (CountOf ty) where
     azero = CountOf 0
     (+) (CountOf a) (CountOf b) = CountOf (a+b)
+    scale n (CountOf a) = CountOf (scale n a)
 
 instance Subtractive (CountOf ty) where
     type Difference (CountOf ty) = Maybe (CountOf ty)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/basement-0.0.8/Basement/UArray/Base.hs 
new/basement-0.0.10/Basement/UArray/Base.hs
--- old/basement-0.0.8/Basement/UArray/Base.hs  2018-02-04 12:55:34.000000000 
+0100
+++ new/basement-0.0.10/Basement/UArray/Base.hs 2019-01-09 12:14:46.000000000 
+0100
@@ -533,7 +533,7 @@
 copyAt (MUArray dstStart _ (MUArrayMBA (MutableBlock dstMba))) ed (MUArray 
srcStart _ (MUArrayAddr srcFptr)) es n =
     withFinalPtr srcFptr $ \srcPtr ->
         let !(Ptr srcAddr) = srcPtr `plusPtr` os
-         in primitive $ \s -> (# compatCopyAddrToByteArray# srcAddr dstMba od 
nBytes s, () #)
+         in primitive $ \s -> (# copyAddrToByteArray# srcAddr dstMba od nBytes 
s, () #)
   where
     !sz                 = primSizeInBytes (Proxy :: Proxy ty)
     !(Offset os)        = offsetOfE sz (srcStart + es)
@@ -569,7 +569,7 @@
 unsafeCopyAtRO (MUArray dstStart _ (MUArrayMBA (MutableBlock dstMba))) ed 
(UArray srcStart _ (UArrayAddr srcFptr)) es n =
     withFinalPtr srcFptr $ \srcPtr ->
         let !(Ptr srcAddr) = srcPtr `plusPtr` os
-         in primitive $ \s -> (# compatCopyAddrToByteArray# srcAddr dstMba od 
nBytes s, () #)
+         in primitive $ \s -> (# copyAddrToByteArray# srcAddr dstMba od nBytes 
s, () #)
   where
     sz  = primSizeInBytes (Proxy :: Proxy ty)
     !(Offset os)        = offsetOfE sz (srcStart+es)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/basement-0.0.8/Basement/UArray/Mutable.hs 
new/basement-0.0.10/Basement/UArray/Mutable.hs
--- old/basement-0.0.8/Basement/UArray/Mutable.hs       2018-01-14 
13:55:26.000000000 +0100
+++ new/basement-0.0.10/Basement/UArray/Mutable.hs      2019-01-09 
12:14:46.000000000 +0100
@@ -169,7 +169,7 @@
   where
     copyNative (MutableBlock mba) = primitive $ \s1 ->
         case unsafeFreezeByteArray# mba s1 of
-            (# s2, ba #) -> (# compatCopyByteArrayToAddr# ba os# dst# szBytes# 
s2, () #)
+            (# s2, ba #) -> (# copyByteArrayToAddr# ba os# dst# szBytes# s2, 
() #)
     copyPtr fptr = unsafePrimFromIO $ withFinalPtr fptr $ \ptr ->
         copyBytes dst (ptr `plusPtr` os) szBytes
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/basement-0.0.8/Basement/UArray.hs 
new/basement-0.0.10/Basement/UArray.hs
--- old/basement-0.0.8/Basement/UArray.hs       2018-02-12 15:24:12.000000000 
+0100
+++ new/basement-0.0.10/Basement/UArray.hs      2019-01-09 12:14:46.000000000 
+0100
@@ -301,7 +301,7 @@
   where
     !(Offset os@(I# os#)) = offsetInBytes $ offset arr
     !(CountOf szBytes@(I# szBytes#)) = sizeInBytes $ length arr
-    copyBa (Block ba) = primitive $ \s1 -> (# compatCopyByteArrayToAddr# ba 
os# dst# szBytes# s1, () #)
+    copyBa (Block ba) = primitive $ \s1 -> (# copyByteArrayToAddr# ba os# dst# 
szBytes# s1, () #)
     copyPtr fptr = unsafePrimFromIO $ withFinalPtr fptr $ \ptr -> copyBytes 
dst (ptr `plusPtr` os) szBytes
 
 -- | Get a Ptr pointing to the data in the UArray.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/basement-0.0.8/basement.cabal 
new/basement-0.0.10/basement.cabal
--- old/basement-0.0.8/basement.cabal   2018-07-08 11:08:56.000000000 +0200
+++ new/basement-0.0.10/basement.cabal  2019-02-06 07:37:49.000000000 +0100
@@ -1,5 +1,5 @@
 name:                basement
-version:             0.0.8
+version:             0.0.10
 synopsis:            Foundation scrap box of array & string
 description:         Foundation most basic primitives without any dependencies
 license:             BSD3
@@ -12,7 +12,7 @@
 homepage:            https://github.com/haskell-foundation/foundation#readme
 bug-reports:         https://github.com/haskell-foundation/foundation/issues
 cabal-version:       >=1.10
-extra-source-files:  cbits/*.h
+extra-source-files:  cbits/*.h cbits/basement_rts.c
 
 source-repository head
   type: git
@@ -157,4 +157,5 @@
     cpp-options: -DARCH_IS_UNKNOWN_ENDIAN
   include-dirs:      cbits
   c-sources:         cbits/foundation_mem.c
-                     cbits/foundation_rts.c
+  if impl(ghc < 8.2)
+    c-sources:       cbits/basement_rts.c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/basement-0.0.8/cbits/basement_rts.c 
new/basement-0.0.10/cbits/basement_rts.c
--- old/basement-0.0.8/cbits/basement_rts.c     1970-01-01 01:00:00.000000000 
+0100
+++ new/basement-0.0.10/cbits/basement_rts.c    2019-01-09 12:14:46.000000000 
+0100
@@ -0,0 +1,8 @@
+#include "Rts.h"
+
+#if __GLASGOW_HASKELL__ < 802
+int basement_is_bytearray_pinned(void *p)
+{
+    return Bdescr((StgPtr) p)->flags & BF_PINNED;
+}
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/basement-0.0.8/cbits/foundation_rts.c 
new/basement-0.0.10/cbits/foundation_rts.c
--- old/basement-0.0.8/cbits/foundation_rts.c   2017-08-05 12:49:52.000000000 
+0200
+++ new/basement-0.0.10/cbits/foundation_rts.c  1970-01-01 01:00:00.000000000 
+0100
@@ -1,8 +0,0 @@
-#include "Rts.h"
-
-#if __GLASGOW_HASKELL__ < 802
-int foundation_is_bytearray_pinned(void *p)
-{
-    return Bdescr((StgPtr) p)->flags & BF_PINNED;
-}
-#endif

++++++ basement.cabal ++++++
--- /var/tmp/diff_new_pack.iPymZB/_old  2019-02-17 12:19:56.876223538 +0100
+++ /var/tmp/diff_new_pack.iPymZB/_new  2019-02-17 12:19:56.876223538 +0100
@@ -1,162 +1,163 @@
-name:                basement
-version:             0.0.8
-x-revision: 1
-synopsis:            Foundation scrap box of array & string
-description:         Foundation most basic primitives without any dependencies
-license:             BSD3
-license-file:        LICENSE
-copyright:           2015-2017 Vincent Hanquez <vinc...@snarc.org>
-                   , 2017-2018 Foundation Maintainers
-maintainer:          vinc...@snarc.org
-category:            Web
-build-type:          Simple
-homepage:            https://github.com/haskell-foundation/foundation#readme
-bug-reports:         https://github.com/haskell-foundation/foundation/issues
-cabal-version:       >=1.10
-extra-source-files:  cbits/*.h
-
-source-repository head
-  type: git
-  location: https://github.com/haskell-foundation/foundation
-  subdir: basement
-
-library
-  hs-source-dirs:    .
-  exposed-modules:
-                     Basement.Imports
-
-                     Basement.Base16
-                     Basement.Bindings.Memory
-                     Basement.Endianness
-                     Basement.Environment
-                     Basement.PrimType
-
-                     Basement.Exception
-                     Basement.Cast
-                     Basement.From
-
-                     Basement.Types.Char7
-                     Basement.Types.CharUTF8
-                     Basement.Types.OffsetSize
-                     Basement.Types.Ptr
-                     Basement.Types.AsciiString
-                     Basement.Types.Word128
-                     Basement.Types.Word256
-                     Basement.Monad
-                     Basement.MutableBuilder
-                     Basement.FinalPtr
-
-                     Basement.Nat
-
-                     -- Extended Types
-                     Basement.BoxedArray
-                     Basement.Block
-                     Basement.Block.Mutable
-                     Basement.Block.Builder
-                     Basement.UArray
-                     Basement.UArray.Mutable
-                     Basement.String
-                     Basement.String.Builder
-                     Basement.NonEmpty
-
-                     -- Extended Types with explicit type level size
-                     Basement.Sized.Block
-                     Basement.Sized.UVect
-                     Basement.Sized.Vect
-                     Basement.Sized.List
-                     Basement.BlockN
-
-                     -- Utils
-                     Basement.NormalForm
-                     Basement.These
-
-                     -- Terminal
-                     Basement.Terminal
-                     Basement.Terminal.ANSI
-
-                     -- numeric stuff
-                     Basement.IntegralConv
-                     Basement.Floating
-                     Basement.Numerical.Number
-                     Basement.Numerical.Additive
-                     Basement.Numerical.Subtractive
-                     Basement.Numerical.Multiplicative
-                     Basement.Bounded
-
-                     -- exported algorithms
-                     Basement.Alg.XorShift
-
-                     -- compat / base redefinition
-                     Basement.Compat.AMP
-                     Basement.Compat.Base
-                     Basement.Compat.Bifunctor
-                     Basement.Compat.CallStack
-                     Basement.Compat.C.Types
-                     Basement.Compat.ExtList
-                     Basement.Compat.IsList
-                     Basement.Compat.Identity
-                     Basement.Compat.Primitive
-                     Basement.Compat.PrimTypes
-                     Basement.Compat.MonadTrans
-                     Basement.Compat.Semigroup
-                     Basement.Compat.Natural
-                     Basement.Compat.NumLiteral
-                     Basement.Compat.Typeable
-
-                     Basement.Bits
-
-  other-modules:
-                     Basement.Error
-                     Basement.Show
-                     Basement.Runtime
-
-                     Basement.Alg.Class
-                     Basement.Alg.Mutable
-                     Basement.Alg.PrimArray
-
-                     Basement.Alg.UTF8
-                     Basement.Alg.String
-
-                     Basement.Numerical.Conversion
-
-                     Basement.Block.Base
-
-                     Basement.UTF8.Base
-                     Basement.UTF8.Helper
-                     Basement.UTF8.Table
-                     Basement.UTF8.Types
-
-                     Basement.UArray.Base
-
-                     Basement.String.CaseMapping
-                     Basement.String.Encoding.Encoding
-                     Basement.String.Encoding.UTF16
-                     Basement.String.Encoding.UTF32
-                     Basement.String.Encoding.ASCII7
-                     Basement.String.Encoding.ISO_8859_1
-
-                     Basement.Terminal.Size
-
-  -- support and dependencies
-  if impl(ghc < 8.0)
-    -- https://github.com/haskell-infra/hackage-trustees/issues/171
-    build-depends:     base >= 4.9 && < 4.13
-  else
-    build-depends:     base
-                     , ghc-prim
-    if os(windows)
-      build-depends:   Win32
-
-  default-language:    Haskell2010
-  default-extensions: NoImplicitPrelude
-                      RebindableSyntax
-                      TypeFamilies
-                      BangPatterns
-                      DeriveDataTypeable
-  if (arch(i386) || arch(x86_64))
-    cpp-options: -DARCH_IS_LITTLE_ENDIAN
-  else
-    cpp-options: -DARCH_IS_UNKNOWN_ENDIAN
-  include-dirs:      cbits
-  c-sources:         cbits/foundation_mem.c
-                     cbits/foundation_rts.c
+name:                basement
+version:             0.0.10
+x-revision: 1
+synopsis:            Foundation scrap box of array & string
+description:         Foundation most basic primitives without any dependencies
+license:             BSD3
+license-file:        LICENSE
+copyright:           2015-2017 Vincent Hanquez <vinc...@snarc.org>
+                   , 2017-2018 Foundation Maintainers
+maintainer:          vinc...@snarc.org
+category:            Web
+build-type:          Simple
+homepage:            https://github.com/haskell-foundation/foundation#readme
+bug-reports:         https://github.com/haskell-foundation/foundation/issues
+cabal-version:       >=1.10
+extra-source-files:  cbits/*.h cbits/basement_rts.c
+
+source-repository head
+  type: git
+  location: https://github.com/haskell-foundation/foundation
+  subdir: basement
+
+library
+  hs-source-dirs:    .
+  exposed-modules:
+                     Basement.Imports
+
+                     Basement.Base16
+                     Basement.Bindings.Memory
+                     Basement.Endianness
+                     Basement.Environment
+                     Basement.PrimType
+
+                     Basement.Exception
+                     Basement.Cast
+                     Basement.From
+
+                     Basement.Types.Char7
+                     Basement.Types.CharUTF8
+                     Basement.Types.OffsetSize
+                     Basement.Types.Ptr
+                     Basement.Types.AsciiString
+                     Basement.Types.Word128
+                     Basement.Types.Word256
+                     Basement.Monad
+                     Basement.MutableBuilder
+                     Basement.FinalPtr
+
+                     Basement.Nat
+
+                     -- Extended Types
+                     Basement.BoxedArray
+                     Basement.Block
+                     Basement.Block.Mutable
+                     Basement.Block.Builder
+                     Basement.UArray
+                     Basement.UArray.Mutable
+                     Basement.String
+                     Basement.String.Builder
+                     Basement.NonEmpty
+
+                     -- Extended Types with explicit type level size
+                     Basement.Sized.Block
+                     Basement.Sized.UVect
+                     Basement.Sized.Vect
+                     Basement.Sized.List
+                     Basement.BlockN
+
+                     -- Utils
+                     Basement.NormalForm
+                     Basement.These
+
+                     -- Terminal
+                     Basement.Terminal
+                     Basement.Terminal.ANSI
+
+                     -- numeric stuff
+                     Basement.IntegralConv
+                     Basement.Floating
+                     Basement.Numerical.Number
+                     Basement.Numerical.Additive
+                     Basement.Numerical.Subtractive
+                     Basement.Numerical.Multiplicative
+                     Basement.Bounded
+
+                     -- exported algorithms
+                     Basement.Alg.XorShift
+
+                     -- compat / base redefinition
+                     Basement.Compat.AMP
+                     Basement.Compat.Base
+                     Basement.Compat.Bifunctor
+                     Basement.Compat.CallStack
+                     Basement.Compat.C.Types
+                     Basement.Compat.ExtList
+                     Basement.Compat.IsList
+                     Basement.Compat.Identity
+                     Basement.Compat.Primitive
+                     Basement.Compat.PrimTypes
+                     Basement.Compat.MonadTrans
+                     Basement.Compat.Semigroup
+                     Basement.Compat.Natural
+                     Basement.Compat.NumLiteral
+                     Basement.Compat.Typeable
+
+                     Basement.Bits
+
+  other-modules:
+                     Basement.Error
+                     Basement.Show
+                     Basement.Runtime
+
+                     Basement.Alg.Class
+                     Basement.Alg.Mutable
+                     Basement.Alg.PrimArray
+
+                     Basement.Alg.UTF8
+                     Basement.Alg.String
+
+                     Basement.Numerical.Conversion
+
+                     Basement.Block.Base
+
+                     Basement.UTF8.Base
+                     Basement.UTF8.Helper
+                     Basement.UTF8.Table
+                     Basement.UTF8.Types
+
+                     Basement.UArray.Base
+
+                     Basement.String.CaseMapping
+                     Basement.String.Encoding.Encoding
+                     Basement.String.Encoding.UTF16
+                     Basement.String.Encoding.UTF32
+                     Basement.String.Encoding.ASCII7
+                     Basement.String.Encoding.ISO_8859_1
+
+                     Basement.Terminal.Size
+
+  -- support and dependencies
+  if impl(ghc < 8.0)
+    -- https://github.com/haskell-infra/hackage-trustees/issues/171
+    build-depends:     base >= 4.9 && < 4.13
+  else
+    build-depends:     base
+                     , ghc-prim
+    if os(windows)
+      build-depends:   Win32
+
+  default-language:    Haskell2010
+  default-extensions: NoImplicitPrelude
+                      RebindableSyntax
+                      TypeFamilies
+                      BangPatterns
+                      DeriveDataTypeable
+  if (arch(i386) || arch(x86_64))
+    cpp-options: -DARCH_IS_LITTLE_ENDIAN
+  else
+    cpp-options: -DARCH_IS_UNKNOWN_ENDIAN
+  include-dirs:      cbits
+  c-sources:         cbits/foundation_mem.c
+  if impl(ghc < 8.2)
+    c-sources:       cbits/basement_rts.c


Reply via email to