packages feed

phonetic-languages-simplified-properties-array-common 0.3.0.0 → 0.4.0.0

raw patch · 5 files changed

+79/−87 lines, 5 filesdep ~basedep ~phonetic-languages-basisdep ~phonetic-languages-rhythmicityPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, phonetic-languages-basis, phonetic-languages-rhythmicity

API changes (from Hackage documentation)

- Phonetic.Languages.Array.Ukrainian.Common: eval23 :: [[Double]] -> Double
- Phonetic.Languages.Array.Ukrainian.Common: eval23Coeffs :: Coeffs2 -> [Double] -> Double
- Phonetic.Languages.Array.Ukrainian.Common: eval23CoeffsF :: Double -> Coeffs2 -> [Double] -> Double
- Phonetic.Languages.Array.Ukrainian.Common: eval23F :: (RealFrac c, Floating c) => c -> [[c]] -> c
- Phonetic.Languages.Array.Ukrainian.Common: eval23K :: (RealFrac c, Floating c) => c -> c -> [[c]] -> c
- Phonetic.Languages.Array.Ukrainian.Common: eval23KF :: (RealFrac c, Floating c) => c -> c -> c -> [[c]] -> c
- Phonetic.Languages.Array.Ukrainian.Common: parseChRhEndMaybe :: ParseChRh -> Maybe Int
- Phonetic.Languages.Array.Ukrainian.Common: procRhythm23F :: Ord c => (Double -> c) -> String -> (String -> Coeffs2 -> String -> Double) -> Coeffs2 -> FuncRep2 String Double c
- Phonetic.Languages.Array.Ukrainian.Common: words1 :: (Ord a, Num a) => [a] -> [[a]]
+ Phladiprelio.Ukrainian.Common: eval23 :: [[Double]] -> Double
+ Phladiprelio.Ukrainian.Common: eval23Coeffs :: Coeffs2 -> [Double] -> Double
+ Phladiprelio.Ukrainian.Common: eval23CoeffsF :: Factors -> Double -> Coeffs2 -> [Double] -> Double
+ Phladiprelio.Ukrainian.Common: eval23F :: Factors -> Double -> [[Double]] -> Double
+ Phladiprelio.Ukrainian.Common: eval23K :: (RealFrac c, Floating c) => c -> c -> [[c]] -> c
+ Phladiprelio.Ukrainian.Common: eval23KF :: Factors -> Double -> Double -> Double -> [[Double]] -> Double
+ Phladiprelio.Ukrainian.Common: parseChRhEndMaybe :: ParseChRh -> Maybe Int
+ Phladiprelio.Ukrainian.Common: procRhythm23F :: Ord c => (Double -> c) -> String -> (String -> Coeffs2 -> String -> Double) -> Coeffs2 -> FuncRep2 String Double c
+ Phladiprelio.Ukrainian.Common: words1 :: (Ord a, Num a) => [a] -> [[a]]

Files

CHANGELOG.md view
@@ -15,3 +15,7 @@ * The third version. Moved the coeffs functionality to the phonetic-languages-basis package.  Updated the dependencies to use the new uniquenessPeriods functionality. +## 0.4.0.0 -- 2023-02-08 ++* The fourth version. Switched to NoImplicitPrelude extension. Updated the dependecies boundaries.+
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2020-2022 OleksandrZhabenko+Copyright (c) 2020-2023 Oleksandr Zhabenko  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
+ Phladiprelio/Ukrainian/Common.hs view
@@ -0,0 +1,69 @@+{-# OPTIONS_HADDOCK show-extensions #-}++-- |+-- Module      :  Phladiprelio.Ukrainian.Common+-- Copyright   :  (c) Oleksandr Zhabenko 2020-2023+-- License     :  MIT+-- Stability   :  Experimental+-- Maintainer  :  oleksandr.zhabenko@yahoo.com+--+-- Generalization of the functionality of the DobutokO.Poetry.Norms+-- and DobutokO.Poetry.Norms.Extended modules+-- from the @dobutokO-poetry@ package. Instead of vectors, uses arrays.++{-# LANGUAGE NoImplicitPrelude, BangPatterns #-}++module Phladiprelio.Ukrainian.Common where++import GHC.Base+import GHC.List+import Phladiprelio.Basis+import Phladiprelio.Rhythmicity.Simple+import Phladiprelio.Rhythmicity.Factor+import Data.Maybe (fromMaybe,isNothing)+import Phladiprelio.Rhythmicity.PolyRhythm+import Text.Read (readMaybe)+import Phladiprelio.Coeffs++procRhythm23F+  :: (Ord c) => (Double -> c)+  -> String+  -> (String -> Coeffs2 -> String -> Double)+  -> Coeffs2+  -> FuncRep2 String Double c+procRhythm23F h choice g coeffs = Phladiprelio.Basis.D (g choice coeffs) h+{-# INLINE procRhythm23F #-}++parseChRhEndMaybe :: ParseChRh -> Maybe Int+parseChRhEndMaybe (P0 _) = Nothing+parseChRhEndMaybe (P1 _ _ n) = Just n+parseChRhEndMaybe (P2 _ _ _ n) = Just n++eval23Coeffs :: Coeffs2 -> [Double] -> Double+eval23Coeffs (CF2 x y) = evalRhythmicity23K (fromMaybe 1.0 x) (fromMaybe 1.0 y)+eval23Coeffs CF0 = evalRhythmicity23+{-# INLINE eval23Coeffs #-}++eval23CoeffsF :: Factors -> Double -> Coeffs2 -> [Double] -> Double+eval23CoeffsF ff k (CF2 x y) = evalRhythmicity23KF ff k (fromMaybe 1.0 x) (fromMaybe 1.0 y)+eval23CoeffsF ff k CF0 = evalRhythmicity23F ff k+{-# INLINE eval23CoeffsF #-}++--------------------------------------------------------------------------------------------++eval23 = evalRhythmicity23 . mconcat+{-# INLINE eval23 #-}++eval23K k2 k3 = evalRhythmicity23K k2 k3 . mconcat+{-# INLINE eval23K #-}++eval23F ff k = evalRhythmicity23F ff k . mconcat+{-# INLINE eval23F #-}++eval23KF ff k k2 k3 = evalRhythmicity23KF ff k k2 k3 . mconcat+{-# INLINE eval23KF #-}++words1 xs = if null ts then [] else w : words1 s'' -- Is inspired by Data.List.words function.+  where ts = dropWhile (> 99) xs+        (w, s'') = span (< 100) ts+{-# NOINLINE words1 #-}
− Phonetic/Languages/Array/Ukrainian/Common.hs
@@ -1,81 +0,0 @@-{-# OPTIONS_HADDOCK show-extensions #-}---- |--- Module      :  Phonetic.Languages.Array.Ukrainian.Common--- Copyright   :  (c) OleksandrZhabenko 2020-2022--- License     :  MIT--- Stability   :  Experimental--- Maintainer  :  olexandr543@yahoo.com------ Generalization of the functionality of the DobutokO.Poetry.Norms--- and DobutokO.Poetry.Norms.Extended modules--- from the @dobutokO-poetry@ package. Instead of vectors, uses arrays.--{-# LANGUAGE CPP, BangPatterns #-}--module Phonetic.Languages.Array.Ukrainian.Common where--#ifdef __GLASGOW_HASKELL__-#if __GLASGOW_HASKELL__>=710-/* code that applies only to GHC 7.10.* and higher versions */-import GHC.Base (mconcat)-#endif-#endif--import Phonetic.Languages.Basis-import Languages.Rhythmicity-import Languages.Rhythmicity.Factor-import Data.Maybe (fromMaybe,isNothing)-import Rhythmicity.PolyRhythm-import Text.Read (readMaybe)-import Phonetic.Languages.Coeffs--#ifdef __GLASGOW_HASKELL__-#if __GLASGOW_HASKELL__==708-/* code that applies only to GHC 7.8.* */-mconcat = concat-#endif-#endif--procRhythm23F-  :: (Ord c) => (Double -> c)-  -> String-  -> (String -> Coeffs2 -> String -> Double)-  -> Coeffs2-  -> FuncRep2 String Double c-procRhythm23F h choice g coeffs = Phonetic.Languages.Basis.D (g choice coeffs) h-{-# INLINE procRhythm23F #-}--parseChRhEndMaybe :: ParseChRh -> Maybe Int-parseChRhEndMaybe (P0 _) = Nothing-parseChRhEndMaybe (P1 _ _ n) = Just n-parseChRhEndMaybe (P2 _ _ _ n) = Just n--eval23Coeffs :: Coeffs2 -> [Double] -> Double-eval23Coeffs (CF2 x y) = evalRhythmicity23K (fromMaybe 1.0 x) (fromMaybe 1.0 y)-eval23Coeffs CF0 = evalRhythmicity23-{-# INLINE eval23Coeffs #-}--eval23CoeffsF :: Double -> Coeffs2 -> [Double] -> Double-eval23CoeffsF k (CF2 x y) = evalRhythmicity23KF k (fromMaybe 1.0 x) (fromMaybe 1.0 y)-eval23CoeffsF k CF0 = evalRhythmicity23F k-{-# INLINE eval23CoeffsF #-}------------------------------------------------------------------------------------------------eval23 = evalRhythmicity23 . mconcat-{-# INLINE eval23 #-}--eval23K k2 k3 = evalRhythmicity23K k2 k3 . mconcat-{-# INLINE eval23K #-}--eval23F k = evalRhythmicity23F k . mconcat-{-# INLINE eval23F #-}--eval23KF k k2 k3 = evalRhythmicity23KF k k2 k3 . mconcat-{-# INLINE eval23KF #-}--words1 xs = if null ts then [] else w : words1 s'' -- Practically this is an optimized versio>-  where ts = dropWhile (> 99) xs-        (w, s'') = span (< 100) ts-{-# NOINLINE words1 #-}
phonetic-languages-simplified-properties-array-common.cabal view
@@ -1,12 +1,12 @@ name:                phonetic-languages-simplified-properties-array-common-version:             0.3.0.0+version:             0.4.0.0 synopsis:            Common functionality for 'with-tuples' and old version of properties.  description:         The common functionality for phonetic-languages-simplified-properties-array and phonetic-languages-simplified-properties-array-old packages. homepage:            https://hackage.haskell.org/package/phonetic-languages-simplified-properties-array-common license:             MIT license-file:        LICENSE author:              OleksandrZhabenko-maintainer:          olexandr543@yahoo.com+maintainer:          oleksandr.zhabenko@yahoo.com copyright:           Oleksandr Zhabenko category:            Language, Math, Game build-type:          Simple@@ -14,9 +14,9 @@ cabal-version:       >=1.10  library-  exposed-modules:     Phonetic.Languages.Array.Ukrainian.Common+  exposed-modules:     Phladiprelio.Ukrainian.Common   -- other-modules:-  other-extensions:    BangPatterns, CPP-  build-depends:       base >=4.8 && <5, phonetic-languages-rhythmicity ==0.9.2.0, phonetic-languages-basis ==0.2.0.0+  other-extensions:    BangPatterns, NoImplicitPrelude+  build-depends:       base >=4.13 && <5, phonetic-languages-rhythmicity ==0.10.2.0, phonetic-languages-basis ==0.3.0.0   -- hs-source-dirs:   default-language:    Haskell2010