mmsyn2 0.2.0.0 → 0.3.0.0
raw patch · 4 files changed
+9/−5 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CaseBi.hs +2/−2
- CaseBi/Unboxed.hs +2/−2
- ChangeLog.md +4/−0
- mmsyn2.cabal +1/−1
CaseBi.hs view
@@ -69,7 +69,7 @@ then getBFst' (def, (V.unsafeSlice 0 (V.length vec `quot` 2) vec)) l else getBFst' (def, (V.unsafeSlice (V.length vec `quot` 2) (V.length vec - (V.length vec `quot` 2)) vec)) l | otherwise = snd (V.unsafeIndex vec 0)-{-# INLINE getBFst' #-}+{-# NOINLINE getBFst' #-} -- | The function that uses special realization of the binary search to effectively transform the 'V.Vector' @a@ to 'V.Vector' @b@ instead of simply use --@@ -138,7 +138,7 @@ sortFst :: (Ord a) => [(a, b)] -> [(a, b)] sortFst xs = if null xs then [] else sortFst (filter (\(x, _) -> compare x (fst (head xs)) == LT) xs) ++ filter (\(x, _) -> x == (fst (head xs))) xs ++ sortFst (filter (\(x, _) -> compare x (fst (head xs)) == GT) xs)-{-# INLINE sortFst #-} +{-# NOINLINE sortFst #-} -- | Function that prepares the list of @(a, b)@ tuples representing the --
CaseBi/Unboxed.hs view
@@ -41,7 +41,7 @@ then getBFst' (def, (V.unsafeSlice 0 (V.length vec `quot` 2) vec)) l else getBFst' (def, (V.unsafeSlice (V.length vec `quot` 2) (V.length vec - (V.length vec `quot` 2)) vec)) l | otherwise = snd (V.unsafeIndex vec 0)-{-# INLINE getBFst' #-}+{-# NOINLINE getBFst' #-} -- | A variant of the 'CaseBi.getBFstV' that operates on the unboxed 'V.Vector'. -- @@ -65,7 +65,7 @@ sortFst :: (Ord a, Unbox a, Unbox b) => [(a, b)] -> [(a, b)] sortFst xs = if null xs then [] else sortFst (filter (\(x, _) -> compare x (fst (head xs)) == LT) xs) ++ filter (\(x, _) -> x == (fst (head xs))) xs ++ sortFst (filter (\(x, _) -> compare x (fst (head xs)) == GT) xs)-{-# INLINE sortFst #-} +{-# NOINLINE sortFst #-} -- | A variant of the 'CaseBi.sortFstV' that operates on the unboxed 'V.Vector'. --
ChangeLog.md view
@@ -40,3 +40,7 @@ * Second version. Added a new module CaseBi.Unboxed with functions that operate on the unboxed vectors. +## 0.3.0.0 -- 2020-10-29++* Third version. Changed inlining policies so that ghc -ddump-lint does not produce warnings. +
mmsyn2.cabal view
@@ -2,7 +2,7 @@ -- see http://haskell.org/cabal/users-guide/ name: mmsyn2-version: 0.2.0.0+version: 0.3.0.0 synopsis: The library that can be used for multiple (Ord a) => a -> b transformations description: The library that can be used for optimization or another representation of multiple (Ord a) => a -> b transformations homepage: https://oleksandrzhabenko.github.io/mmsyn2