phonetic-languages-simplified-generalized-examples-common 0.3.0.0 → 0.4.0.0
raw patch · 4 files changed
+27/−11 lines, 4 filesdep ~basedep ~phonetic-languages-phonetics-basicsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, phonetic-languages-phonetics-basics
API changes (from Hackage documentation)
- Phonetic.Languages.General.Common: fLines :: Concatenations -> String -> String -> String -> Int -> String -> [String]
+ Phonetic.Languages.General.Common: fLines :: Concatenations -> Concatenations -> String -> String -> String -> Int -> String -> [String]
- Phonetic.Languages.General.Common: fLinesIO :: Concatenations -> String -> String -> String -> String -> IO ()
+ Phonetic.Languages.General.Common: fLinesIO :: Concatenations -> Concatenations -> String -> String -> String -> String -> IO ()
- Phonetic.Languages.General.Common: fLinesN :: Int -> Concatenations -> String -> String -> String -> Int -> String -> [String]
+ Phonetic.Languages.General.Common: fLinesN :: Int -> Concatenations -> Concatenations -> String -> String -> String -> Int -> String -> [String]
- Phonetic.Languages.General.Common: fLinesNIO :: Int -> Concatenations -> String -> String -> String -> String -> IO ()
+ Phonetic.Languages.General.Common: fLinesNIO :: Int -> Concatenations -> Concatenations -> String -> String -> String -> String -> IO ()
Files
- ChangeLog.md +8/−0
- LICENSE +1/−1
- Phonetic/Languages/General/Common.hs +16/−8
- phonetic-languages-simplified-generalized-examples-common.cabal +2/−2
ChangeLog.md view
@@ -29,3 +29,11 @@ * Third version. Added two parameterized functions fLinesN and fLinesNIO that allow also to specify the maximum number of words in every line.++## 0.4.0.0 -- 2022-02-09++* Fourth version. Fixed the long existing issues with not working prepending needed concatenations for the text in the+module Data.Phonetic.Languages.PrepareText from the dependency of phonetic-languages-phonetics-basics package+related functionality. Added also the possibility to not only prepend needed words, but also append.+This introduces breaking changes, so please, wait for update for all the dependent packages before starting the upgrade, also+check the code that uses library functions afterwards.
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2021 Oleksandr Zhabenko+Copyright (c) 2021-2022 Oleksandr Zhabenko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
Phonetic/Languages/General/Common.hs view
@@ -4,7 +4,7 @@ -- | -- Module : Phonetic.Languages.General.Common--- Copyright : (c) OleksandrZhabenko 2020-2021+-- Copyright : (c) OleksandrZhabenko 2020-2022 -- License : MIT -- Stability : Experimental -- Maintainer : olexandr543@yahoo.com@@ -25,15 +25,17 @@ fLinesN :: Int- -> Concatenations -- ^ Data used to concatenate the basic grammar preserving words and word sequences to the next word to+ -> Concatenations -- ^ Data used to concatenate (prepend) the basic grammar preserving words and word sequences to the next word to -- leave the most of the meaning (semantics) of the text available to easy understanding while reading and listening to.+ -> Concatenations -- ^ Data used to concatenate (append) the basic grammar preserving words and word sequences to the next word to+ -- leave the most of the meaning (semantics) of the text available to easy understanding while reading and listening to. -> String -> String -> String -> Int -> String -> [String]-fLinesN n ysss xs us vs !toOneLine ys = filter (any (\x -> isPLL xs x && isAlpha x)) . prepareTextN n ysss xs .+fLinesN n ysss zsss xs us vs !toOneLine ys = filter (any (\x -> isPLL xs x && isAlpha x)) . prepareTextN n ysss zsss xs . (\z -> if toOneLine == 1 then unls z else z) $ ys -- the 'unls' is taken from the 'Data.List.words' and rewritten to be equal to 'unwords' . 'words' where unls s = case dropWhile (`elem` (' ':us `mappend` vs)) s of@@ -42,8 +44,10 @@ where (w, s'') = break (`elem` (' ':us `mappend` vs)) s' fLines- :: Concatenations -- ^ Data used to concatenate the basic grammar preserving words and word sequences to the next word to+ :: Concatenations -- ^ Data used to concatenate (prepend) the basic grammar preserving words and word sequences to the next word to -- leave the most of the meaning (semantics) of the text available to easy understanding while reading and listening to.+ -> Concatenations -- ^ Data used to concatenate (append) the basic grammar preserving words and word sequences to the next word to+ -- leave the most of the meaning (semantics) of the text available to easy understanding while reading and listening to. -> String -> String -> String@@ -55,18 +59,22 @@ fLinesNIO :: Int- -> Concatenations -- ^ Data used to concatenate the basic grammar preserving words and word sequences to the next word to+ -> Concatenations -- ^ Data used to concatenate (prepend) the basic grammar preserving words and word sequences to the next word to -- leave the most of the meaning (semantics) of the text available to easy understanding while reading and listening to.+ -> Concatenations -- ^ Data used to concatenate (append) the basic grammar preserving words and word sequences to the next word to+ -- leave the most of the meaning (semantics) of the text available to easy understanding while reading and listening to. -> String -> String -> String -> String -> IO ()-fLinesNIO n ysss xs us vs ys = mapM_ putStrLn . map (\(i,x) -> show (i + 1) ++ "\t" ++ x) . helpG3 . indexedL "" .- filter (any (\x -> isPLL xs x && isAlpha x)) . prepareTextN n ysss xs $ ys+fLinesNIO n ysss zsss xs us vs ys = mapM_ putStrLn . map (\(i,x) -> show (i + 1) ++ "\t" ++ x) . helpG3 . indexedL "" .+ filter (any (\x -> isPLL xs x && isAlpha x)) . prepareTextN n ysss zsss xs $ ys fLinesIO- :: Concatenations -- ^ Data used to concatenate the basic grammar preserving words and word sequences to the next word to+ :: Concatenations -- ^ Data used to concatenate (prepend) the basic grammar preserving words and word sequences to the next word to+ -- leave the most of the meaning (semantics) of the text available to easy understanding while reading and listening to.+ -> Concatenations -- ^ Data used to concatenate (append) the basic grammar preserving words and word sequences to the next word to -- leave the most of the meaning (semantics) of the text available to easy understanding while reading and listening to. -> String -> String
phonetic-languages-simplified-generalized-examples-common.cabal view
@@ -3,7 +3,7 @@ -- http://haskell.org/cabal/users-guide/ name: phonetic-languages-simplified-generalized-examples-common-version: 0.3.0.0+version: 0.4.0.0 synopsis: Some common code for phonetic languages generalized functionality. description: Is intended to be used in the phonetic-languages-simplified-generalized-examples-array package. homepage: https://hackage.haskell.org/package/phonetic-languages-simplified-generalized-examples-common@@ -21,6 +21,6 @@ exposed-modules: Phonetic.Languages.General.SimpleConstraints, Phonetic.Languages.General.Common, Phonetic.Languages.General.DeEnCoding -- other-modules: other-extensions: BangPatterns, FlexibleContexts- build-depends: base >=4.8 && <4.16, phonetic-languages-phonetics-basics >=0.8.3 && <1, heaps >=0.3.6.1 && <1+ build-depends: base >=4.8 && <5, phonetic-languages-phonetics-basics >=0.9 && <1, heaps >=0.3.6.1 && <1 -- hs-source-dirs: default-language: Haskell2010