phladiprelio-general-datatype 0.1.1.0 → 0.2.0.0
raw patch · 4 files changed
+35/−12 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- Phladiprelio.General.Datatype: readBasicUkr :: (String -> [a]) -> ([a] -> [Double]) -> String -> [Double]
- Phladiprelio.General.Datatype: readBasicUkr0 :: Double -> (String -> [a]) -> ([a] -> [Double]) -> String -> [Double]
+ Phladiprelio.General.Datatype: L1 :: !a -> BasicLan a
+ Phladiprelio.General.Datatype: L2 :: !Double -> BasicLan a
+ Phladiprelio.General.Datatype: data BasicLan a
+ Phladiprelio.General.Datatype: instance GHC.Classes.Eq a => GHC.Classes.Eq (Phladiprelio.General.Datatype.BasicLan a)
+ Phladiprelio.General.Datatype: instance GHC.Classes.Ord a => GHC.Classes.Ord (Phladiprelio.General.Datatype.BasicLan a)
+ Phladiprelio.General.Datatype: readBasic :: (String -> [a]) -> ([a] -> [Double]) -> String -> [Double]
+ Phladiprelio.General.Datatype: readBasic0 :: Double -> (String -> [a]) -> ([a] -> [Double]) -> String -> [Double]
+ Phladiprelio.General.Datatype: readBasic0G :: (String -> Bool) -> Double -> (String -> [a]) -> ([a] -> [Double]) -> String -> [Double]
+ Phladiprelio.General.Datatype: readBasicG :: (String -> Bool) -> (String -> [a]) -> ([a] -> [Double]) -> String -> [Double]
Files
- CHANGELOG.md +5/−0
- Phladiprelio/General/Datatype.hs +24/−6
- README.md +3/−4
- phladiprelio-general-datatype.cabal +3/−2
CHANGELOG.md view
@@ -8,3 +8,8 @@ * First version revised A. Fixed issue with some non-typical though possible strings. +## 0.2.0.0 -- 2023-09-23++* Second version. Added new functions, some generalization provided. Improved .cabal file. +Some minor documentation improvements. Fixed inaccuracies in the documentation.+
Phladiprelio/General/Datatype.hs view
@@ -14,27 +14,45 @@ convF :: t a -> t b } +-- | Universal data, can be used e. g. for phladiprelio-general series of packages.+data BasicLan a = L1 !a | L2 !Double deriving (Eq, Ord)++-- | Specific for Ukranian data type for phladiprelio-ukrainian series of packages. data BasicUkr = U1 {-# UNPACK #-} !Char | U2 !Double deriving (Eq, Ord) -readBasicUkr0 +readBasic0 :: Double -> (String -> [a]) -> ([a] -> [Double]) -> String -> [Double]-readBasicUkr0 temp fConvA fConvD xs@(_:_) = dc `mappend` ((readU2 ws * d) : readBasicUkr0 d fConvA fConvD qs)+readBasic0 = readBasic0G (not . null . filter (not . isSpace))++readBasic = readBasic0 1.0+{-# INLINE readBasic #-}++readBasic0G + :: (String -> Bool) -- ^ A special function to check whether the 'String' contains needed information. Must return 'True' for the 'String' that contains the needed for usual processment information, otherwise — 'False'.+ -> Double+ -> (String -> [a])+ -> ([a] -> [Double])+ -> String + -> [Double]+readBasic0G p temp fConvA fConvD xs@(_:_) = dc `mappend` ((readU2 ws * d) : readBasic0G p d fConvA fConvD qs) where (ts, us) = break (== '_') xs dc - | null . filter (not . isSpace) $ ts = [temp]+ | not . p $ ts = [temp] | otherwise = fConvD . fConvA $ ts d = last dc vs = dropWhile (== '_') us (ws, qs) = span isDigit vs-readBasicUkr0 _ _ _ _ = []+readBasic0G _ _ _ _ _ = [] -readBasicUkr = readBasicUkr0 1.0-{-# INLINE readBasicUkr #-}+readBasicG p = readBasic0G p 1.0+{-# INLINE readBasicG #-} ++-- | Is a way to read duration of the additional added time period into the line. readU2 :: String -> Double readU2 xs@(y:ys) = read (y:'.':ys)::Double
README.md view
@@ -2,7 +2,7 @@ lines are easy to pronounce and read while others are not. They are in two languages by the following links: -[Ukranian text](https://www.academia.edu/105067723/%D0%A7%D0%BE%D0%BC%D1%83_%D0%B4%D0%B5%D1%8F%D0%BA%D1%96_%D1%80%D1%8F%D0%B4%D0%BA%D0%B8_%D0%BB%D0%B5%D0%B3%D0%BA%D0%BE_%D0%B2%D0%B8%D0%BC%D0%BE%D0%B2%D0%BB%D1%8F%D1%82%D0%B8_%D0%B0_%D1%96%D0%BD%D1%88%D1%96_%D0%BD%D1%96_%D0%B0%D0%B1%D0%BE_%D0%BF%D1%80%D0%BE%D1%81%D0%BE%D0%B4%D0%B8%D1%87%D0%BD%D0%B0_%D0%BD%D0%B5%D1%81%D0%BF%D1%80%D0%BE%D0%B3%D0%BD%D0%BE%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D1%96%D1%81%D1%82%D1%8C_%D1%8F%D0%BA_%D1%85%D0%B0%D1%80%D0%B0%D0%BA%D1%82%D0%B5%D1%80%D0%B8%D1%81%D1%82%D0%B8%D0%BA%D0%B0_%D1%82%D0%B5%D0%BA%D1%81%D1%82%D1%83)+[Чому деякі рядки легко вимовляти,а інші — ні,або Просодична неспрогнозованість як характеристика тексту](https://www.academia.edu/105067723/%D0%A7%D0%BE%D0%BC%D1%83_%D0%B4%D0%B5%D1%8F%D0%BA%D1%96_%D1%80%D1%8F%D0%B4%D0%BA%D0%B8_%D0%BB%D0%B5%D0%B3%D0%BA%D0%BE_%D0%B2%D0%B8%D0%BC%D0%BE%D0%B2%D0%BB%D1%8F%D1%82%D0%B8_%D0%B0_%D1%96%D0%BD%D1%88%D1%96_%D0%BD%D1%96_%D0%B0%D0%B1%D0%BE_%D0%BF%D1%80%D0%BE%D1%81%D0%BE%D0%B4%D0%B8%D1%87%D0%BD%D0%B0_%D0%BD%D0%B5%D1%81%D0%BF%D1%80%D0%BE%D0%B3%D0%BD%D0%BE%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D1%96%D1%81%D1%82%D1%8C_%D1%8F%D0%BA_%D1%85%D0%B0%D1%80%D0%B0%D0%BA%D1%82%D0%B5%D1%80%D0%B8%D1%81%D1%82%D0%B8%D0%BA%D0%B0_%D1%82%D0%B5%D0%BA%D1%81%D1%82%D1%83) [English text](https://www.academia.edu/105067761/Why_some_lines_are_easy_to_pronounce_and_others_are_not_or_prosodic_unpredictability_as_a_characteristic_of_text) @@ -14,10 +14,9 @@ Devotion ======== -P.S.: the author would like to devote this project to support the [Foundation-Gastrostars](https://gastrostars.nl).+P.S.: the author would like to devote this project to support the [Foundation Gastrostars](https://gastrostars.nl). -On the 2023/09/22 there is Nathalie Kok, the mother of the foundation founder [Emma Kok](https://emmakok.nl) and the member of the foundation board, so the versions 0.1.0.0 and 0.1.1.0 (the two first ones!) are also dedicated to Nathalie Kok.+On the 2023/09/22 there is Nathalie's Kok birthday. She is the mother of the foundation founder [Emma Kok](https://emmakok.nl) and the member of the foundation board, so the versions 0.1.0.0, 0.1.1.0 and 0.2.0.0 (the three first ones!) are also dedicated to Nathalie Kok. If you would like to share some financial support, please, contact the mentioned foundation using the URL:
phladiprelio-general-datatype.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.24 name: phladiprelio-general-datatype-version: 0.1.1.0+version: 0.2.0.0 synopsis: Extended functionality of PhLADiPreLiO description: Can be used not only for language, but also for simpler music and lyrics composing. homepage:@@ -19,7 +19,8 @@ library exposed-modules: Phladiprelio.General.Datatype -- other-modules:- -- other-extensions:+ other-extensions: NoImplicitPrelude, BangPatterns+ ghc-options: -funbox-strict-fields build-depends: base >=4.13 && <5 hs-source-dirs: . default-language: Haskell2010