phonetic-languages-simplified-common 0.1.0.0 → 0.2.0.0
raw patch · 3 files changed
+39/−6 lines, 3 filesdep ~phonetic-languages-permutationsPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: phonetic-languages-permutations
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−0
- Phonetic/Languages/Simplified/StrictVG.hs +32/−4
- phonetic-languages-simplified-common.cabal +2/−2
CHANGELOG.md view
@@ -3,3 +3,8 @@ ## 0.1.0.0 -- 2020-11-19 * First version. Released on an unsuspecting world.++## 0.2.0.0 -- 2020-11-20++* Second version. Added new functions to the Phonetic.Languages.Simplified.StrictVG module accordingly to the updated dependency of+phonetic-languages-permutations.
Phonetic/Languages/Simplified/StrictVG.hs view
@@ -27,7 +27,7 @@ -> (t a -> VB.Vector a) -- ^ The function that is used internally to convert to the boxed 'VB.Vector' of @a@ so that the function can process further the permutations -> ((t (t a)) -> VB.Vector (VB.Vector a)) -- ^ The function that is used internally to convert to the boxed 'VB.Vector' of 'VB.Vector' of @a@ so that the function can process further -> (VB.Vector a -> t a) -- ^ The function that is used internally to convert from the boxed 'VB.Vector' of @a@ so that the function can process further- -> VB.Vector (VB.Vector Int) -- ^ The list of permutations of 'Int' indices starting from 0 and up to n (n is probably less than 8).+ -> VB.Vector (VB.Vector Int) -- ^ The permutations of 'Int' indices starting from 0 and up to n (n is probably less than 8). -> t (t a) -- ^ Must be obtained as 'subG' @whspss xs@ -> VB.Vector (t a) uniquenessVariants2GNB !hd f1 f2 f3 perms !subs = uniquenessVariants2GNPB mempty mempty hd f1 f2 f3 perms subs@@ -40,13 +40,41 @@ -> (t a -> VB.Vector a) -- ^ The function that is used internally to convert to the boxed 'VB.Vector' of @a@ so that the function can process further the permutations -> ((t (t a)) -> VB.Vector (VB.Vector a)) -- ^ The function that is used internally to convert to the boxed 'VB.Vector' of 'VB.Vector' of @a@ so that the function can process further -> (VB.Vector a -> t a) -- ^ The function that is used internally to convert from the boxed 'VB.Vector' of @a@ so that the function can process further- -> VB.Vector (VB.Vector Int) -- ^ The list of permutations of 'Int' indices starting from 0 and up to n (n is probably less than 7).+ -> VB.Vector (VB.Vector Int) -- ^ The permutations of 'Int' indices starting from 0 and up to n (n is probably less than 7). -> t (t a) -- ^ Must be obtained as @subG whspss xs@ -> VB.Vector (t a) uniquenessVariants2GNPB !ts !us !hd f1 f2 f3 perms !subs- | F.null subs = VB.empty+ | F.null subs = mempty | otherwise = let !uss = (hd %@ us) %^ mempty- !baseV = VB.map (hd `VB.cons`) . f2 $ subs+ !baseV = VB.map (hd %@) . f2 $ subs !ns = universalSetG ts uss f1 f2 perms baseV in VB.map f3 ns++uniquenessVariants2GNBL ::+ (Eq a, Foldable t, InsertLeft t a, Monoid (t a), Monoid (t (t a))) => a -- ^ The first most common element in the \"whitespace symbols\" structure+ -> (t a -> [a]) -- ^ The function that is used internally to convert to the @[a]@ so that the function can process further the permutations+ -> ((t (t a)) -> [[a]]) -- ^ The function that is used internally to convert to the @[[a]]@ so that the function can process further+ -> ([a] -> t a) -- ^ The function that is used internally to convert to the needed representation so that the function can process further+ -> [VB.Vector Int] -- ^ The permutations of 'Int' indices starting from 0 and up to n (n is probably less than 8).+ -> t (t a) -- ^ Must be obtained as 'subG' @whspss xs@+ -> [t a]+uniquenessVariants2GNBL !hd f1 f2 f3 perms !subs = uniquenessVariants2GNPBL mempty mempty hd f1 f2 f3 perms subs+{-# INLINE uniquenessVariants2GNBL #-}++uniquenessVariants2GNPBL ::+ (Eq a, Foldable t, InsertLeft t a, Monoid (t a), Monoid (t (t a))) => t a+ -> t a+ -> a -- ^ The first most common element in the whitespace symbols structure+ -> (t a -> [a]) -- ^ The function that is used internally to convert to the @[a]@ so that the function can process further the permutations+ -> ((t (t a)) -> [[a]]) -- ^ The function that is used internally to convert to the @[[a]]@ so that the function can process further+ -> ([a] -> t a) -- ^ The function that is used internally to convert to the needed representation that the function can process further+ -> [VB.Vector Int] -- ^ The permutations of 'Int' indices starting from 0 and up to n (n is probably less than 7).+ -> t (t a) -- ^ Must be obtained as @subG whspss xs@+ -> [t a]+uniquenessVariants2GNPBL !ts !us !hd f1 f2 f3 perms !subs+ | F.null subs = mempty+ | otherwise =+ let !uss = (hd %@ us) %^ mempty+ !baseV = VB.fromList . map (hd %@) . f2 $ subs+ !ns = universalSetGL ts uss f1 f2 perms baseV in map f3 ns
phonetic-languages-simplified-common.cabal view
@@ -3,7 +3,7 @@ -- http://haskell.org/cabal/users-guide/ name: phonetic-languages-simplified-common-version: 0.1.0.0+version: 0.2.0.0 synopsis: A simplified version of the phonetic-languages-functionality description: A simplified version of the phonetic-languages-functionality. Tries to use only necessary functionality and reduce the other one. homepage: https://hackage.haskell.org/package/phonetic-languages-simlified-common@@ -21,6 +21,6 @@ exposed-modules: Phonetic.Languages.Simplified.DataG, Phonetic.Languages.Simplified.StrictVG -- other-modules: other-extensions: BangPatterns, FlexibleContexts- build-depends: base >=4.8 && <4.15, subG >=0.4.2 && <1, subG-instances >=0.1 && <1, vector >=0.11 && <0.14, phonetic-languages-permutations >=0.1.1 && <1+ build-depends: base >=4.8 && <4.15, subG >=0.4.2 && <1, subG-instances >=0.1 && <1, vector >=0.11 && <0.14, phonetic-languages-permutations >=0.2 && <1 -- hs-source-dirs: default-language: Haskell2010