uniqueness-periods-vector-common 0.5.0.0 → 0.5.1.0
raw patch · 3 files changed
+27/−4 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +5/−0
- Languages/UniquenessPeriods/Vector/StrictV.hs +21/−3
- uniqueness-periods-vector-common.cabal +1/−1
ChangeLog.md view
@@ -25,3 +25,8 @@ * Fifth version. Added a new data type FuncRep a b c to Languages.UniquenessPeriods.Vector.Data module to avoid significant code duplication with further usage. Switched the needed functionality to the new data type variant. ++## 0.5.1.0 -- 2020-10-12++* Fifth version revised A. Fixed issue with unnecessary application of the Data.List.intercalate function in the Languages.UniquenessPeriods.Vector.StrictV module that led to +inconsistency and (some) divergence in the functions with applied uniquenessVariants2GNP.
Languages/UniquenessPeriods/Vector/StrictV.hs view
@@ -13,7 +13,12 @@ {-# LANGUAGE CPP, BangPatterns #-} -module Languages.UniquenessPeriods.Vector.StrictV where+module Languages.UniquenessPeriods.Vector.StrictV (+ uniquenessVariants2GN+ , uniquenessVariants2GNP+ , sublistsG+ , preAppend+) where #ifdef __GLASGOW_HASKELL__ #if __GLASGOW_HASKELL__>=804@@ -22,10 +27,23 @@ import Prelude hiding ((<>)) #endif #endif+#ifdef __GLASGOW_HASKELL__+#if __GLASGOW_HASKELL__>=710+/* code that applies only to GHC 7.10.* and higher versions */+import GHC.Base (mconcat)+#endif+#endif import qualified Data.Vector as V-import qualified Data.List as L (permutations,intercalate)+import qualified Data.List as L (permutations) import Languages.UniquenessPeriods.Vector.Data +#ifdef __GLASGOW_HASKELL__+#if __GLASGOW_HASKELL__==708+/* code that applies only to GHC 7.8.* */+mconcat = concat+#endif+#endif+ -- | Given a [a] consisting of no more than 7 sublists interspersed with the elements of the first argument, -- it returns a 'V.Vector' of possible combinations without repeating of the sublists in different order and for each of them appends also -- the information about generalized \"uniqueness periods\" (see @uniqueness-periods-vector@ package) to it and finds out@@ -54,7 +72,7 @@ uniquenessVariants2GNP !ts !us whspss vN frep !xs | null . sublistsG whspss $ xs = V.empty | not . null $ whspss = let !hd = head whspss in let !ns = take 8 . sublistsG whspss $ xs in- V.fromList . map ((\vs -> let !rs = getAC frep $ vs in (rs, (V.map (\f -> f rs) vN), vs)) . L.intercalate [hd] . preAppend ts [us]) .+ V.fromList . map ((\vs -> let !rs = getAC frep $ vs in (rs, (V.map (\f -> f rs) vN), vs)) . mconcat . preAppend ts [hd:us]) . L.permutations . map (hd:) $ ns | otherwise = error "Languages.UniquenessPeriods.Vector.StrictV.uniquenessVariants2GNP: undefined for the empty third argument. "
uniqueness-periods-vector-common.cabal view
@@ -2,7 +2,7 @@ -- For further documentation, see http://haskell.org/cabal/users-guide/ name: uniqueness-periods-vector-common-version: 0.5.0.0+version: 0.5.1.0 synopsis: Generalization of the dobutokO-poetry-general package functionality description: Generalization of the dobutokO-poetry-general package functionality. Can be used to rearrange 7 sublists in the list to obtain somewhat more suitable list for some purposes. homepage: https://hackage.haskell.org/package/uniqueness-periods-vector-common