packages feed

hw-prim 0.0.3.8 → 0.1.0.0

raw patch · 3 files changed

+15/−5 lines, 3 filesdep +deepseqPVP ok

version bump matches the API change (PVP)

Dependencies added: deepseq

API changes (from Hackage documentation)

- HaskellWorks.Data.Naive: getNaive :: Naive a -> a
+ HaskellWorks.Data.Naive: naive :: Naive a -> a
+ HaskellWorks.Data.Positioning: instance Control.DeepSeq.NFData HaskellWorks.Data.Positioning.Count
+ HaskellWorks.Data.Positioning: instance Control.DeepSeq.NFData HaskellWorks.Data.Positioning.Position

Files

hw-prim.cabal view
@@ -1,5 +1,5 @@ name:                   hw-prim-version:                0.0.3.8+version:                0.1.0.0 synopsis:               Primitive functions and data types description:            Please see README.md homepage:               http://github.com/haskell-works/hw-prim#readme@@ -38,6 +38,7 @@                       , HaskellWorks.Data.Vector.VectorLike   build-depends:        base                          >= 4          && < 5                       , bytestring+                      , deepseq                       , random                       , vector 
src/HaskellWorks/Data/Naive.hs view
@@ -1,10 +1,10 @@ module HaskellWorks.Data.Naive     ( Naive(..)-    , getNaive+    , naive     ) where  newtype Naive a = Naive a deriving (Eq, Show) -getNaive :: Naive a -> a-getNaive (Naive a) = a-{-# INLINE getNaive #-}+naive :: Naive a -> a+naive (Naive a) = a+{-# INLINE naive #-}
src/HaskellWorks/Data/Positioning.hs view
@@ -8,6 +8,7 @@   , toPosition   ) where +import           Control.DeepSeq import           Data.Int import           Data.Word import           System.Random@@ -25,6 +26,14 @@  instance Show Position where     show (Position n) = show n++instance NFData Count where+  rnf = rnf . getCount+  {-# INLINE rnf #-}++instance NFData Position where+  rnf = rnf . getPosition+  {-# INLINE rnf #-}  -- | Convert a count to a position toPosition :: Count -> Position