packages feed

phonetic-languages-constraints-array 0.7.1.0 → 0.7.2.0

raw patch · 3 files changed

+13/−11 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -75,4 +75,10 @@ incorrect foldr function definition. Now the algebraic constraints functionality should work better  (hopefully, as expected). +## 0.7.2.0 -- 2023-06-02++* Seventh version revised C. Fixed issue with the shadowing of the variable in the lambda function+in the oneChange function definition that leads to incorrect behaviour of the parentheses handling.+Some minor documentation and code improvements.+ 
Phladiprelio/ConstraintsEncoded.hs view
@@ -133,6 +133,7 @@ stage1Parsing =  groupBy (\x y -> x == '(' && y == '(' || isLetter x && isDigit y || x == ')' && y == ')') {-# INLINE stage1Parsing #-} +-- | At the moment is used only for the list of 'String' without any parentheses in each of them. convertToBools    :: Int    -> Array Int Int @@ -141,23 +142,18 @@ convertToBools n arr xss@("-":yss) = "not " `mappend` (convertToBools n arr yss) convertToBools n arr xss@(" ":yss) = " || " `mappend` (convertToBools n arr yss) convertToBools n arr xss@(xs:yss@(ys:tss))-  | any (== '(') xs = xs `mappend` " " `mappend` convertToBools n arr yss-  | any (== ')') xs = xs `mappend` (if ys == " " then "" else " && ") `mappend` convertToBools n arr yss   | xs `elem` ["True","False"] = xs `mappend` (case ys of -                                                 ')':_ -> " "                                                   " "   -> " "                                                  _     -> " && ") `mappend` convertToBools n arr yss    | otherwise = let cnstrs = fromMaybe E . readMaybeECG n $ xs in                        show (isConstraint1 True arr cnstrs)                        `mappend` (case ys of -                                   ')':_ -> " "                                     " "   -> " "                                    _     -> " && ") `mappend` convertToBools n arr yss  convertToBools n arr xss@(xs:yss) -  | any (== ')') xs = xs    | xs `elem` ["True","False"] = xs-  | otherwise = (show . isConstraint1 True arr . fromMaybe E . readMaybeECG n $ xs) -- `mappend` "!!!!!"-convertToBools n arr _ = ""+  | otherwise = (show . isConstraint1 True arr . fromMaybe E . readMaybeECG n $ xs) +convertToBools n arr _ = []  splitNoParenAtDisjunction :: [String] -> [[String]] splitNoParenAtDisjunction xss@(xs:yss) @@ -194,8 +190,8 @@ oneChange :: Int -> Array Int Int -> [String] -> [String] oneChange m arr xss    | null wss = [show . oneStep m arr $ xss]-  | otherwise = ((\(jss, m, qss) -> jss `mappend` [show . oneStep m arr $ qss]) . -                  foldr (\xs uss@(tss, n, rss) -> if xs == "(" && n == 0 +  | otherwise = ((\(jss, _, qss) -> jss `mappend` [show . oneStep m arr $ qss]) . +                  foldr (\xs (tss, n, rss) -> if xs == "(" && n == 0                                                        then (tss, 1, rss)                                                        else if any (== '(') xs && n == 0                                                                then (drop 1 xs:tss, 1, rss)@@ -206,7 +202,7 @@         kss = case wss of                 ")":vss -> vss                  ws:vss -> drop 1 ws : vss-                _      -> wss+                _      -> []  generalConversion :: Int -> String -> Array Int Int -> Bool generalConversion m xs arr
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.7.1.0+version:             0.7.2.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