packages feed

uniqueness-periods-vector-general 0.4.5.0 → 0.4.6.0

raw patch · 3 files changed

+46/−11 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Languages.UniquenessPeriods.Vector.General.Debug: printUniquenessG1ListStr :: Show b => Info2 -> [UniquenessG1 Char b] -> IO ()

Files

ChangeLog.md view
@@ -60,4 +60,9 @@  ## 0.4.5.0 -- 2020-10-06 -* Fourth version revised E. Fixed issues related to the dependency of uniqueness-periods-vector-common package prior to 0.4.1 versions. +* Fourth version revised E. Fixed issues related to the dependency of uniqueness-periods-vector-common package prior to 0.4.1 versions.++## 0.4.6.0 -- 2020-10-07++* Fourth version revised F. Fixed issue with incomplete information being printed in functions printUniquenessG1List and printUniquenessG1.+Added a new function printUniquenessG1ListStr with prettier printing for the Char-based arguments (strings).
Languages/UniquenessPeriods/Vector/General/Debug.hs view
@@ -31,6 +31,8 @@   , toFile   , printUniquenessG1   , printUniquenessG1List+  -- *** With 'String'-based arguments+  , printUniquenessG1ListStr   -- *** Auxiliary function   , newLineEnding ) where@@ -87,7 +89,7 @@         _ -> mapM_ putStrLn [show . lastFrom3 $ uni, show . firstFrom3 $ uni, show. secondFrom3 $ uni]  -- the most verbose output   | otherwise =       case (\(I2 x) -> x) info of-        Af _ -> putStr "" -- nothing is printed+        Af xs -> putStr "" -- nothing is printed         Bf xs -> toFile xs [show . lastFrom3 $ uni]         Cf xs -> toFile xs [show . firstFrom3 $ uni]         Df xs -> toFile xs [show . secondFrom3 $ uni]@@ -105,24 +107,52 @@   | isI1 info =       case (\(I1 x) -> x) info of         A -> putStr "" -- nothing is printed-        B -> mapM_ putStrLn . map (show . lastFrom3) $ ys-        C -> mapM_ putStrLn . map (show . firstFrom3) $ ys-        D -> mapM_ putStrLn . map (show . secondFrom3) $ ys+        B -> mapM_ putStrLn . map (show . lastFrom3) $ (y:ys)+        C -> mapM_ putStrLn . map (show . firstFrom3) $ (y:ys)+        D -> mapM_ putStrLn . map (show . secondFrom3) $ (y:ys)         E -> (putStrLn . show . lastFrom3 $ y) >> (putStrLn . show . firstFrom3 $ y) >> printUniquenessG1List info ys         F -> (putStrLn . show . lastFrom3 $ y) >> (putStrLn . show . secondFrom3 $ y) >> printUniquenessG1List info ys         G -> (putStrLn . show . firstFrom3 $ y) >> (putStrLn . show . secondFrom3 $ y) >> printUniquenessG1List info ys         _ -> (putStrLn . show . lastFrom3 $ y) >> (putStrLn . show . firstFrom3 $ y) >> (putStrLn . show. secondFrom3 $ y) >> printUniquenessG1List info ys  -- the most verbose output   | otherwise =       case (\(I2 x) -> x) info of-        Af _ -> putStr "" -- nothing is printed-        Bf xs -> toFile xs . map (show . lastFrom3) $ ys-        Cf xs -> toFile xs . map (show . firstFrom3) $ ys-        Df xs -> toFile xs . map (show . secondFrom3) $ ys+        Af xs -> putStr "" -- nothing is printed+        Bf xs -> toFile xs . map (show . lastFrom3) $ (y:ys)+        Cf xs -> toFile xs . map (show . firstFrom3) $ (y:ys)+        Df xs -> toFile xs . map (show . secondFrom3) $ (y:ys)         Ef xs -> toFile xs . map (\t -> (show (lastFrom3 t) ++ newLineEnding ++ show (firstFrom3 t))) $ ys         Ff xs -> toFile xs . map (\t -> (show (lastFrom3 t) ++ newLineEnding ++ show (secondFrom3 t))) $ ys         Gf xs -> toFile xs . map (\t -> (show (firstFrom3 t) ++ newLineEnding ++ show (secondFrom3 t))) $ ys         ~(Hf xs) -> toFile xs . map (\t -> (show (lastFrom3 t) ++ newLineEnding ++ show (firstFrom3 t) ++ newLineEnding ++ show (secondFrom3 t))) $ ys  -- the most verbose output-printUniquenessG1List _ [] = return ()+printUniquenessG1List info [] = return ()++-- | A variant of the 'printUniquenessG1List' where @a@ is 'Char' so that the inner third arguments in the triples are 'String's.+printUniquenessG1ListStr+  :: (Show b) => Info2 -- ^ A parameter to control the predefined behaviour of the printing. The 'I1' branch prints to the 'stdout' and the 'I2' - to the file.+  -> [UniquenessG1 Char b] -- ^ The list of elements, for which the information is printed.+  -> IO ()+printUniquenessG1ListStr info (y:ys)+  | isI1 info =+      case (\(I1 x) -> x) info of+        A -> putStr "" -- nothing is printed+        B -> mapM_ putStrLn . map lastFrom3 $ (y:ys)+        C -> mapM_ putStrLn . map (show . firstFrom3) $ (y:ys)+        D -> mapM_ putStrLn . map (show . secondFrom3) $ (y:ys)+        E -> (putStrLn . lastFrom3 $ y) >> (putStrLn . show . firstFrom3 $ y) >> printUniquenessG1ListStr info ys+        F -> (putStrLn . lastFrom3 $ y) >> (putStrLn . show . secondFrom3 $ y) >> printUniquenessG1ListStr info ys+        G -> (putStrLn . show . firstFrom3 $ y) >> (putStrLn . show . secondFrom3 $ y) >> printUniquenessG1ListStr info ys+        _ -> (putStrLn . lastFrom3 $ y) >> (putStrLn . show . firstFrom3 $ y) >> (putStrLn . show. secondFrom3 $ y) >> printUniquenessG1ListStr info ys  -- the most verbose output+  | otherwise =+      case (\(I2 x) -> x) info of+        Af xs -> putStr "" -- nothing is printed+        Bf xs -> toFile xs . map lastFrom3 $ (y:ys)+        Cf xs -> toFile xs . map (show . firstFrom3) $ (y:ys)+        Df xs -> toFile xs . map (show . secondFrom3) $ (y:ys)+        Ef xs -> toFile xs . map (\t -> (lastFrom3 t ++ newLineEnding ++ show (firstFrom3 t))) $ ys+        Ff xs -> toFile xs . map (\t -> (lastFrom3 t ++ newLineEnding ++ show (secondFrom3 t))) $ ys+        Gf xs -> toFile xs . map (\t -> (show (firstFrom3 t) ++ newLineEnding ++ show (secondFrom3 t))) $ ys+        ~(Hf xs) -> toFile xs . map (\t -> (lastFrom3 t ++ newLineEnding ++ show (firstFrom3 t) ++ newLineEnding ++ show (secondFrom3 t))) $ ys  -- the most verbose output+printUniquenessG1ListStr info [] = return ()  -- | Auxiliary printing function to define the line ending needed to be printed by 'printUniquenessG1List' function in some cases. newLineEnding :: String
uniqueness-periods-vector-general.cabal view
@@ -2,7 +2,7 @@ --   For further documentation, see http://haskell.org/cabal/users-guide/  name:                uniqueness-periods-vector-general-version:             0.4.5.0+version:             0.4.6.0 synopsis:            Some kind of the optimization approach to data inner structure. description:         Generalization of the functionality of the dobutokO-poetry-general-languages package homepage:            https://hackage.haskell.org/package/uniqueness-periods-vector-general