packages feed

phonetic-languages-constraints-array 0.6.0.0 → 0.6.1.0

raw patch · 3 files changed

+18/−1 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Phladiprelio.ConstraintsEncoded: filterGeneralConv :: Int -> String -> [Array Int Int] -> [Array Int Int]
+ Phladiprelio.ConstraintsEncoded: validOrdStr :: String -> Bool

Files

CHANGELOG.md view
@@ -44,4 +44,9 @@ Added some boolean algebra interpeter for constraints to Phladiprelio.ConstraintsEncoded module.  Added README.md file and devotion of the project to Foundation Gastrostars.  +## 0.6.1.0 -- 2023-05-23++* Sixth version revised A. Added new function filterGeneralConv to Phladiprelio.ConstraintsEncoded +module. Added also validOrdStr to the export list in the module. Some minor documentation+improvements.  
Phladiprelio/ConstraintsEncoded.hs view
@@ -40,7 +40,9 @@   , isR   , isM   -- * Algebraic general conversion+  , validOrdStr   , generalConversion+  , filterGeneralConv ) where  import GHC.Base@@ -114,6 +116,8 @@   | otherwise = False validOrdStr0 _ n m  = n == m +-- | An extended predicate to check whether the 'String' is a probably correct representation of the+-- constraints algebraic expression for 'generalConversion' evaluation. validOrdStr :: String -> Bool validOrdStr xs = validOrdStr0 xs 0 0  {-# INLINE validOrdStr #-}@@ -190,6 +194,14 @@       head . head . dropWhile ((/= 1) . length)  . drop 1 . iterate (oneChange m arr) . stage1Parsing $ xs    | otherwise = False {-# INLINE generalConversion #-}++-- | Can be thought of as 'filter' ('generalConversion' ... ) @<arrays>@ but is somewhat more efficient.+filterGeneralConv :: Int -> String -> [Array Int Int] -> [Array Int Int]+filterGeneralConv m cnstrns xs +  | validOrdStr cnstrns = +    filter (\arr -> (\ks -> if ks == "True" || ks == "E" then True else False) . head . head . dropWhile ((/= 1) . length) . drop 1 . iterate (oneChange m arr) . stage1Parsing $ cnstrns) xs+  | otherwise = []+{-# INLINE filterGeneralConv #-}  -- | Inspired by the: https://hackage.haskell.org/package/base-4.14.0.0/docs/Data-Maybe.html -- Is provided here as a more general way to read the 'String' into a 'EncodedCnstrs'. 
phonetic-languages-constraints-array.cabal view
@@ -2,7 +2,7 @@ -- For further documentation, see http://haskell.org/cabal/users-guide/  name:                phonetic-languages-constraints-array-version:             0.6.0.0+version:             0.6.1.0 synopsis:            Constraints to filter the needed permutations description:         Provides several the most important variants of constraints. Can be used with the phonetic-languages-common series of package. Instead of vectors, uses arrays. homepage:            https://hackage.haskell.org/package/phonetic-languages-constraints-array