phonetic-languages-constraints-array 0.6.1.1 → 0.6.2.0
raw patch · 3 files changed
+27/−14 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−0
- Phladiprelio/ConstraintsEncoded.hs +21/−13
- phonetic-languages-constraints-array.cabal +1/−1
CHANGELOG.md view
@@ -54,3 +54,8 @@ * Sixth version revised B. Some minor code improvements. +## 0.6.2.0 -- 2023-05-25++* Sixth version revised C. Fixed the issues with precedence of the (&&) and (||) logical operators. +Now it should behave as usual and as is defined in Haskell98 and Haskell2010. +
Phladiprelio/ConstraintsEncoded.hs view
@@ -152,25 +152,33 @@ | otherwise = (show . isConstraint1 True arr . fromMaybe E . readMaybeECG n $ xs) -- `mappend` "!!!!!" convertToBools n arr _ = "" -noParenString :: [String] -> Bool -noParenString xss@(xs:ys:ts:yss) +splitNoParenAtDisjunction :: [String] -> [[String]]+splitNoParenAtDisjunction xss@(xs:yss) + | null tss = []+ | otherwise = tss : splitNoParenAtDisjunction wss + where (tss,uss) = break (== "||") xss+ wss = drop 1 uss +splitNoParenAtDisjunction _ = []++noParenString0 :: [String] -> Bool +noParenString0 xss@(xs:ys:ts:yss) | xs == "not" = case ys of - "True" -> if ts == "&&" then False - else noParenString yss - "False" -> if ts == "&&" then noParenString yss - else True + "True" -> False + "False" -> noParenString0 yss | otherwise = case xs of- "True" -> if ys == "&&" then noParenString (ts:yss)- else True - "False" -> if ys == "&&" then False - else noParenString (ts:yss)-noParenString xss@("not":ys:yss) = if ys == "True" then False else True -noParenString xss@(xs:yss) + "True" -> noParenString0 (ts:yss)+ "False" -> False +noParenString0 xss@("not":ys:yss) = if ys == "True" then False else True +noParenString0 xss@(xs:yss) | xs == "True" = True | otherwise = False -noParenString _ = True+noParenString0 _ = True++noParenString :: [String] -> Bool+noParenString = or . map noParenString0 . splitNoParenAtDisjunction+{-# INLINE noParenString #-} oneChange :: Int -> Array Int Int -> [String] -> [String] oneChange m arr xss
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.1.1+version: 0.6.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