packages feed

string-interpreter 0.5.0.0 → 0.5.1.0

raw patch · 3 files changed

+14/−14 lines, 3 files

Files

ChangeLog.md view
@@ -21,3 +21,7 @@ ## 0.5.0.0 -- 2021-09-04  * Fifth version. Added new functions that can be used in the phonetic languages approach.++## 0.5.1.0 -- 2021-09-04++* Fifth version revised A. Fixed issue with some not common patterns in the phonetic languages approach.
Interpreter/StringConversion.hs view
@@ -14,7 +14,7 @@  import Text.Read (readMaybe) import Data.Maybe (fromJust,fromMaybe)-import Data.Char (isDigit,isAlpha)+import Data.Char (isDigit) import Data.List (sort,nub,(\\)) import Data.Monoid (mappend) import Control.Exception@@ -62,22 +62,18 @@  ------------------------------------------------------------- -{-| If 'True' then it might be the one word in the phonetic languages approach. If 'False', it is usually not.--}-mightBePLWord :: String -> Bool-mightBePLWord xs- | null (dropWhile (not . isAlpha) us) = not (null ts)- | otherwise = False-     where (ts,us) = span isAlpha xs-{-# INLINE mightBePLWord #-}- argsConvertTextual :: String -> [String] -> [String] argsConvertTextual ts tss  | any (== ts) tss = tss  | otherwise = tss `mappend` [ts] {-# INLINE argsConvertTextual #-} -fullArgsConvertTextual :: String -> String -> [String] -> [String]-fullArgsConvertTextual textProcessment0 lineA args =-  argsConvertTextual textProcessment0 (takeWhile (not . mightBePLWord) args `mappend` words lineA)+fullArgsConvertTextual+  :: (String -> Bool) -- ^ The predicate that checks whether the given argument is not a phonetic language word in the representation.+  -> String+  -> String+  -> [String]+  -> [String]+fullArgsConvertTextual p textProcessment0 lineA args =+  argsConvertTextual textProcessment0 (takeWhile p args `mappend` words lineA) {-# INLINE fullArgsConvertTextual #-}
string-interpreter.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                string-interpreter-version:             0.5.0.0+version:             0.5.1.0 synopsis:            Is used in the phonetic languages approach (e. g. in the recursive mode). description:         A library that has commonly used functions for the phonetic-languages implementations that deals with String data. homepage:            https://hackage.haskell.org/package/string-interpreter