packages feed

phonetic-languages-simplified-properties-array 0.16.0.0 → 0.17.2.0

raw patch · 28 files changed

Files

CHANGELOG.md view
@@ -124,3 +124,20 @@  * Sixteenth version. Switched to the generalization of the diverse functions. Changed the  type of many functions related. Updated the dependencies as needed.++## 0.17.0.0 -- 2023-03-01++* Seventeenth version. Switched to NoImplicitPrelude extension. Some code deduplications and+optimizations. Removed the modules with saving the functionality. Fixed some issues with +logical duplication. Changed the function types and reduced the number of code written.+Partially changed the definition of some functions.++## 0.17.1.0 -- 2023-03-01++* Seventeenth version revised A. Fixed issue with being not compiled for GHC-9.2* and higher versions.++## 0.17.2.0 -- 2023-03-15++* Seventeenth version revised B. Updated the dependencies boundaries and splitted the one dependency+into two so that to reduce code duplication for different implementations of PhLADiPreLiO.+
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/Emphasis.hs view
@@ -0,0 +1,152 @@+{-# OPTIONS_HADDOCK show-extensions #-}++-- |+-- Module      :  Phladiprelio.Ukrainian.PropertiesFuncRepG2+-- Copyright   :  (c) Oleksandr Zhabenko 2020-2023+-- License     :  MIT+-- Stability   :  Experimental+-- Maintainer  :  oleksandr.zhabenko@yahoo.com+--+-- ++{-# LANGUAGE BangPatterns, NoImplicitPrelude #-}++module Phladiprelio.Ukrainian.Emphasis where++import GHC.Base+import Text.Show (Show(..))+import GHC.List+import GHC.Num ((+),(-))+import GHC.Real (fromIntegral)+import Data.Tuple (fst,snd)+import Phladiprelio.Ukrainian.Syllable+import Phladiprelio.Ukrainian.Melodics+import Phladiprelio.Ukrainian.SyllableDouble (syllableDurationsGD)+import GHC.Int+import Data.Maybe (fromMaybe)+import Text.Read (readMaybe)+import Data.Char (toUpper)+import GHC.Arr+import Data.List (scanl',intersperse,words)+import CaseBi.Arr+import CaseBi.Arr (getBFst',getBFstLSorted')+import Data.Lists.FLines (newLineEnding)+import Data.Traversable (traverse)+import Control.Applicative+import System.IO++data SyllWeights = Sy {+  point :: !FlowSound+  , order :: !Int8 -- Is intended to begin at -128 up to 0 (maximum 129 entries).+  , weight :: !Double+}++instance Show SyllWeights where+  show (Sy ps i w) = showFS ps `mappend` (' ':show i) `mappend` (' ':show w) `mappend` newLineEnding++weightSyllablesIO :: [FlowSound] -> IO [SyllWeights]+weightSyllablesIO = traverse (\(i,xs) -> (\d1 -> (Sy xs i d1)) <$> weightSyllAIO False xs)  . zip ([-128..0]::[Int8])++weightStringIO :: String -> IO ([[FlowSound]],[SyllWeights],[[FlowSound]])+weightStringIO xs = weightSyllablesIO fss >>= \zs -> pure (tsss, zs, helper1F . scanl' (+) (-128::Int8) . map (fromIntegral . length) $ tsss)+  where tsss = createSyllablesUkrS xs+        fss = [ ts | tss <- tsss , ts <- tss ]++weightStringNIO :: Int ->  String -> IO ([[FlowSound]],[[SyllWeights]],[[FlowSound]])+weightStringNIO n xs = traverse (\_-> weightSyllablesIO fss) [1..n] >>= \zss -> pure (tsss, zss, helper1F . scanl' (+) (-128::Int8) . map (fromIntegral . length) $ tsss)+  where tsss = createSyllablesUkrS xs+        fss = [ ts | tss <- tsss , ts <- tss ]++weights2SyllableDurationsDArr :: [SyllWeights] -> Array Int (Sound8,Double)+weights2SyllableDurationsDArr xs = listArray (0,l-1) . map (\(Sy _ i w) -> (i,w)) $ xs+  where l = length xs++weights2SyllableDurationsD :: [SyllWeights] -> [[[Sound8]]] -> [[Double]]+weights2SyllableDurationsD xs = syllableDurationsGD (getBFst' (4.0, weights2SyllableDurationsDArr xs))+{-# INLINE weights2SyllableDurationsD #-}++helper1F :: [Int8] -> [[FlowSound]]+helper1F (x:y:ys) = map (:[]) [x..y-1]:helper1F (y:ys)+helper1F _ = []++weightSyllAIO :: Bool -> FlowSound -> IO Double+weightSyllAIO upper xs+  | null xs = pure 4.0+  | otherwise = +    (\d -> fromMaybe 4.0 (readMaybe d::Maybe Double)) <$> (hPutStr stderr ("?  " `mappend` ((if upper then map toUpper else id) . showFS $ xs) `mappend` "   ") *> getLine) -- Well, definitely it should not be 'stderr' here, but 'stdout' gives some strange behaviour, probably related to optimizations or some strange 'Handle' behaviour. (?)+++data ReadyForConstructionUkr = Str String | FSL [[FlowSound]] deriving (Eq,Ord)++showR :: ReadyForConstructionUkr -> String+showR (Str xs) = xs+showR (FSL tsss) = show tsss++isStr :: ReadyForConstructionUkr -> Bool+isStr (Str _) = True+isStr _ = False++isFSL :: ReadyForConstructionUkr -> Bool+isFSL (FSL _) = True+isFSL _ = False++fromReadyFCUkrS :: ReadyForConstructionUkr -> Maybe String+fromReadyFCUkrS (Str xs) = Just xs+fromReadyFCUkrS _ = Nothing++fromReadyFCUkrF :: ReadyForConstructionUkr -> Maybe [[FlowSound]]+fromReadyFCUkrF (FSL xsss) = Just xsss+fromReadyFCUkrF _ = Nothing++helper2F :: [b] -> [a] -> [a] -> [[a]] -> [([b],[a],[a])]+helper2F vs xs ys tss = let (us,ks,rs) = unzip3 . zip3 vs xs $ ys in+  helper2F' us ks rs tss+    where helper2F' us@(_:_) ks@(_:_) rs@(_:_) tss@(ts:wss) =+            let l = length ts+                (wws,vvs) = splitAt l us+                (qs,ps) = splitAt l ks+                (ns,ms) = splitAt l rs+                in (wws,qs,ns):helper2F' vvs ps ms wss+          helper2F' _ _ _ _ = []+ +convF1 :: String -> [[FlowSound]]+convF1 xs+ | null xs = []+ | otherwise = [ tss | tss <- createSyllablesUkrS xs ]++convF3 :: String -> [([String],[FlowSound],[FlowSound])]+convF3 xs+ | null xs = [([],[],[])]+ | otherwise = helper2F (concatMap (map showFS) tsss) (map (:[]) ([-128..0]::[Int8])) [ ts | tss <- qss, ts <- tss ] qss+    where tsss = createSyllablesUkrS xs+          qss = [ tss | tss <- tsss ]++convF3W :: String -> [(String,[FlowSound])]+convF3W xs+ | null xs = [([],[])]+ | otherwise = zipWith (\(_,ys,_) ts -> (ts,ys)) (convF3 xs) . words $ xs++convFI :: String -> String -> [[FlowSound]]+convFI ts = map f . words+  where !f = getBFstL' [] (convF3W ts)++convFSL :: String -> ReadyForConstructionUkr -> String+convFSL ts r@(Str xs) = concat . concat . intersperse [" "] . map (\(ks,_,_)-> ks) . convF3 $ xs+   where js =  unzip . map (\(rs,ps,_) -> (ps,rs)) . convF3 $ ts+convFSL ts r@(FSL tsss) =  concat . concat . intersperse [" "] . map (map (getBFstLSorted' " " ks) ) $ tsss+   where js = unzip . map (\(rs,ps,_) -> (ps,rs)) . convF3 $ ts+         ks = zip (concat . fst $ js) (concat . snd $ js)++weightsString3IO :: Bool -> String -> IO ([[FlowSound]],[[[FlowSound]] -> [[Double]]],ReadyForConstructionUkr)+weightsString3IO bool bs + | bool = do+   (syllDs1,sylws,fsls0) <- weightStringIO bs+   let syllableDurationsD2s = [weights2SyllableDurationsD sylws]+   return (syllDs1,syllableDurationsD2s,FSL fsls0) + | otherwise = return ([],[],FSL [])++weightsString3NIO :: Int -> Bool -> String -> IO ([[FlowSound]],[[[FlowSound]] -> [[Double]]],ReadyForConstructionUkr)+weightsString3NIO n bool bs + | bool = (\(syllDs1,sylws,fsls0) -> (syllDs1,map weights2SyllableDurationsD sylws,FSL fsls0)) <$> weightStringNIO n bs+ | otherwise = pure ([],[],FSL [])+
+ Phladiprelio/Ukrainian/PropertiesFuncRepG2.hs view
@@ -0,0 +1,55 @@+{-# OPTIONS_HADDOCK show-extensions #-}++-- |+-- Module      :  Phladiprelio.Ukrainian.PropertiesFuncRepG2+-- 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 #-}++module Phladiprelio.Ukrainian.PropertiesFuncRepG2 (+  -- * Extended functions+  -- ** Functions with 'Int16'+  procDiverse2ITup+  -- ** Functions with 'Double'+  -- *** More general+  , procB2FGTup+  , procB2InvFGTup+  -- *** Usual ones+  , procDiverse2FTup+  , procBothFTup+  , procBothFFTup+  , procBothInvFTup+  , procBothInvFFTup+  -- *** Working with generated by r-glpk-phonetic-languages-ukrainian-durations syllable durations+  , procBoth2FTup+  , procBoth2FFTup+  , procBoth2InvFTup+  , procBoth2InvFFTup+  -- *** NEW Working with generated by r-glpk-phonetic-languages-ukrainian-durations syllable durations+  , procBoth3FTup+  , procBoth3FFTup+  , procBoth3InvFTup+  , procBoth3InvFFTup+  , procBoth4FTup+  , procBoth4FFTup+  , procBoth4InvFTup+  , procBoth4InvFFTup+  -- ** Working with rhythmicity+  , procRhythmicity23FTup+  -- *** Working with rhythmicity that can be defined by the user (using 'rhythmicityH')+  , procRhythmicity23FHTup+) where++import Phladiprelio.Ukrainian.PropertiesFuncRepG2Common+import Phladiprelio.Ukrainian.PropertiesSyllablesG2Common+import Phladiprelio.Ukrainian.Common+import Phladiprelio.Ukrainian.PropertiesFuncRepG2Diverse+import Phladiprelio.Ukrainian.PropertiesFuncRepG2Rhythmicity+import Phladiprelio.Ukrainian.PropertiesFuncRepG24
+ Phladiprelio/Ukrainian/PropertiesFuncRepG24.hs view
@@ -0,0 +1,210 @@+{-# OPTIONS_HADDOCK show-extensions #-}++-- |+-- Module      :  Phladiprelio.Ukrainian.PropertiesFuncRepG24+-- 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 #-}++module Phladiprelio.Ukrainian.PropertiesFuncRepG24 where++import GHC.Base+import Phladiprelio.Ukrainian.Common+import Phladiprelio.Ukrainian.PropertiesFuncRepG2Common+import Phladiprelio.Basis+import qualified Phladiprelio.Ukrainian.SyllableDouble as SD+import Phladiprelio.Ukrainian.Melodics+import GHC.Arr (Array)+import GHC.Int (Int8)+import Phladiprelio.Ukrainian.Emphasis+import Phladiprelio.Coeffs+import Phladiprelio.Rhythmicity.Factor++procBothFTupG+  :: Int+  -> Coeffs2+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> (Double -> Double)+  -> FlowSound+  -> FuncRep2 ReadyForConstructionUkr Double Double+procBothFTupG n coeffs = procB2FTup coeffs +    (case n of +       1 -> SD.syllableDurationsD +       2 -> SD.syllableDurationsD2+       3 -> SD.syllableDurationsD3+       4 -> SD.syllableDurationsD4) +{-# INLINE procBothFTupG #-}++procBothFTup = procBothFTupG 1+{-# INLINE procBothFTup #-}++procBoth2FTup = procBothFTupG 2+{-# INLINE procBoth2FTup #-}++procBoth3FTup = procBothFTupG 3+{-# INLINE procBoth3FTup #-}++procBoth4FTup = procBothFTupG 4+{-# INLINE procBoth4FTup #-}++procBothFFTupG+  ::  Int+  -> Factors+  -> Double+  -> Coeffs2+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> (Double -> Double)+  -> FlowSound +  -> FuncRep2 ReadyForConstructionUkr Double Double+procBothFFTupG n ff k coeffs = procB2FFTup ff k coeffs +    (case n of+       1 -> SD.syllableDurationsD+       2 -> SD.syllableDurationsD2+       3 -> SD.syllableDurationsD3+       4 -> SD.syllableDurationsD4)+{-# INLINE procBothFFTupG #-}++procBothFFTup = procBothFFTupG 1+{-# INLINE procBothFFTup #-}++procBoth2FFTup = procBothFFTupG 2+{-# INLINE procBoth2FFTup #-}++procBoth3FFTup = procBothFFTupG 3+{-# INLINE procBoth3FFTup #-}++procBoth4FFTup = procBothFFTupG 4+{-# INLINE procBoth4FFTup #-}+++procBothInvFTupG+  :: Int+  ->  Coeffs2+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> (Double -> Double)+  -> FlowSound+  -> FuncRep2 ReadyForConstructionUkr Double Double+procBothInvFTupG n coeffs = procB2InvFTup coeffs +    (case n of+       1 -> SD.syllableDurationsD+       2 -> SD.syllableDurationsD2+       3 -> SD.syllableDurationsD3+       4 -> SD.syllableDurationsD4)+{-# INLINE procBothInvFTupG #-}++procBothInvFTup = procBothInvFTupG 1+{-# INLINE procBothInvFTup #-}++procBoth2InvFTup = procBothInvFTupG 2+{-# INLINE procBoth2InvFTup #-}++procBoth3InvFTup = procBothInvFTupG 3+{-# INLINE procBoth3InvFTup #-}++procBoth4InvFTup = procBothInvFTupG 4+{-# INLINE procBoth4InvFTup #-}+++procBothInvFFTupG+  :: Int+  -> Factors+  -> Double+  -> Coeffs2+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> (Double -> Double)+  -> FlowSound+  -> FuncRep2 ReadyForConstructionUkr Double Double+procBothInvFFTupG n ff k coeffs = procB2InvFFTup ff k coeffs +    (case n of+       1 -> SD.syllableDurationsD+       2 -> SD.syllableDurationsD2+       3 -> SD.syllableDurationsD3+       4 -> SD.syllableDurationsD4)+{-# INLINE procBothInvFFTupG #-}++procBothInvFFTup = procBothInvFFTupG 1+{-# INLINE procBothInvFFTup #-}++procBoth2InvFFTup = procBothInvFFTupG 2+{-# INLINE procBoth2InvFFTup #-}++procBoth3InvFFTup = procBothInvFFTupG 3+{-# INLINE procBoth3InvFFTup #-}++procBoth4InvFFTup = procBothInvFFTupG 4+{-# INLINE procBoth4InvFFTup #-}+++-------------------------++
+ Phladiprelio/Ukrainian/PropertiesFuncRepG2Common.hs view
@@ -0,0 +1,205 @@+{-# OPTIONS_HADDOCK show-extensions #-}++-- |+-- Module      :  Phladiprelio.Ukrainian.PropertiesFuncRepG2Common+-- 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 CPP, BangPatterns #-}++module Phladiprelio.Ukrainian.PropertiesFuncRepG2Common where++import GHC.Base+import Phladiprelio.Ukrainian.Common+import Phladiprelio.UniquenessPeriodsG+import Phladiprelio.Basis+import GHC.Float (int2Double)+import qualified Phladiprelio.Ukrainian.Syllable as S+import Phladiprelio.Ukrainian.Melodics+import GHC.Arr (Array)+import GHC.Int (Int8)+import Phladiprelio.Ukrainian.Emphasis+import Phladiprelio.Coeffs+import Phladiprelio.Rhythmicity.Factor++procB2FGTup+  :: Coeffs2+  -> ([Double] -> Double)+  -> ([[[Sound8]]] -> [[Double]])+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> (Double -> Double)+  -> FlowSound+  -> FuncRep2 ReadyForConstructionUkr Double Double+procB2FGTup coeffs h1 g tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 h sels+ = D (\xs -> case xs of+               Str ts ->+                 let ys = convertToProperUkrainianI8WithTuples  tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 .          map (\x -> if x == '-' then ' ' else x) $ ts in  ((int2Double . fromEnum . diverse2GGL sels [100,101] $ ys)*(h1 . mconcat . g .+                             map (S.divVwls . S.reSyllableCntntsTup tup17 . S.groupSnds) . words1 $ ys))+               FSL xsss -> h1 . mconcat . g $ xsss) h+{-# INLINE procB2FGTup #-}++procB2InvFGTup+  :: Coeffs2+  -> ([Double] -> Double)+  ->  ([[[Sound8]]] -> [[Double]])+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> (Double -> Double)+  -> FlowSound+  -> FuncRep2 ReadyForConstructionUkr Double Double+procB2InvFGTup coeffs h1 g tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 h sels+ = D (\xs -> case xs of+               Str ts ->+                 let !ys = convertToProperUkrainianI8WithTuples  tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 .+                             map (\x -> if x == '-' then ' ' else x) $ ts+                     !z = diverse2GGL sels [100,101] ys in if z == 0 then  (h1 . mconcat . g . map (S.divVwls . S.reSyllableCntntsTup tup17 .+                             S.groupSnds) . words1 $ ys) ** 2.0+                                 else  ((h1 . mconcat . g . map (S.divVwls . S.reSyllableCntntsTup tup17 . S.groupSnds) . words1 $ ys) / (int2Double . fromEnum $ z))+               FSL xsss -> h1 . mconcat . g $ xsss) h+{-# INLINE procB2InvFGTup #-}++procB2FTup+  :: Coeffs2+  -> ([[[Sound8]]] -> [[Double]])+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> (Double -> Double)+  -> FlowSound+  -> FuncRep2 ReadyForConstructionUkr Double Double+procB2FTup coeffs = procB2FGTup coeffs (eval23Coeffs coeffs)+{-# INLINE procB2FTup #-}++procB2FFTup+  :: Factors+  -> Double+  -> Coeffs2+  -> ([[[Sound8]]] -> [[Double]])+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> (Double -> Double)+  -> FlowSound+  -> FuncRep2 ReadyForConstructionUkr Double Double+procB2FFTup ff k coeffs = procB2FGTup coeffs (eval23CoeffsF ff k coeffs) +{-# INLINE procB2FFTup #-}++procB2InvFTup+  :: Coeffs2+  -> ([[[Sound8]]] -> [[Double]])+  ->  Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> (Double -> Double)+  -> FlowSound+  -> FuncRep2 ReadyForConstructionUkr Double Double+procB2InvFTup coeffs = procB2InvFGTup coeffs (eval23Coeffs coeffs)+{-# INLINE procB2InvFTup #-}++procB2InvFFTup+  :: Factors+  -> Double+  -> Coeffs2+  -> ([[[Sound8]]] -> [[Double]])+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> (Double -> Double)+  -> FlowSound+  -> FuncRep2 ReadyForConstructionUkr Double Double+procB2InvFFTup ff k coeffs = procB2InvFGTup coeffs (eval23CoeffsF ff k coeffs)+{-# INLINE procB2InvFFTup #-}+
+ Phladiprelio/Ukrainian/PropertiesFuncRepG2Diverse.hs view
@@ -0,0 +1,85 @@+{-# OPTIONS_HADDOCK show-extensions #-}++-- |+-- Module      :  Phladiprelio.Ukrainian.PropertiesFuncRepG2Diverse+-- 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, MagicHash #-}++module Phladiprelio.Ukrainian.PropertiesFuncRepG2Diverse (+  -- * Functions with 'Int16'+  procDiverse2ITup+  -- ** Usual ones+  , procDiverse2FTup+) where++import GHC.Enum (fromEnum)+import GHC.Base+import GHC.Int+import GHC.Arr (Array)+import Phladiprelio.UniquenessPeriodsG+import Phladiprelio.Basis+import GHC.Float (int2Double)+import Phladiprelio.Ukrainian.Melodics+import Phladiprelio.Ukrainian.Emphasis++procDiverse2ITup+  :: (Ord c) => Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> (Int16 -> c)+  -> FlowSound+  -> FuncRep2 ReadyForConstructionUkr Int16 c+procDiverse2ITup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 g sels+  = D (\x -> case x of+               Str xs -> diverse2GGL sels [100,101] .+                  convertToProperUkrainianI8WithTuples tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 $ xs+               FSL xsss -> 1) g+{-# INLINE procDiverse2ITup #-}++procDiverse2FTup+  :: (Ord c) => Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> (Double -> c)+  -> FlowSound+  -> FuncRep2 ReadyForConstructionUkr Double c+procDiverse2FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 g sels+  = D (\x -> case x of+               Str xs -> int2Double . fromEnum . diverse2GGL sels [100,101] .+                  convertToProperUkrainianI8WithTuples tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 $ xs+               FSL xsss -> 1.0) g+{-# INLINE procDiverse2FTup #-}
+ Phladiprelio/Ukrainian/PropertiesFuncRepG2Rhythmicity.hs view
@@ -0,0 +1,91 @@+{-# OPTIONS_HADDOCK show-extensions #-}++-- |+-- Module      :  Phladiprelio.Ukrainian.PropertiesFuncRepG2Rhythmicity+-- 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 #-}++module Phladiprelio.Ukrainian.PropertiesFuncRepG2Rhythmicity (+  -- * Extended+  -- ** Working with rhythmicity+  procRhythmicity23FTup+  -- *** Working with rhythmicity that can be defined by the user (using 'rhythmicityH')+  , procRhythmicity23FHTup+) where+++import GHC.Base+import Phladiprelio.Ukrainian.Common hiding (procRhythm23F)+import Phladiprelio.Ukrainian.PropertiesSyllablesG2H+import Phladiprelio.Ukrainian.PropertiesSyllablesG2Hprime+import qualified Phladiprelio.Basis as B+import Phladiprelio.Ukrainian.Melodics+import GHC.Arr (Array)+import GHC.Int (Int8)+import Phladiprelio.Ukrainian.Emphasis+import Phladiprelio.Coeffs+import Phladiprelio.Rhythmicity.Factor++procRhythmicity23FTup+  :: (Ord c) => Factors+  -> Double+  -> (Double -> c)+  -> String+  -> Coeffs2+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> B.FuncRep2 ReadyForConstructionUkr Double c+procRhythmicity23FTup ff k g choice coeffs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  = B.D (rhythmicityTup ff k choice coeffs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17) g+{-# INLINE procRhythmicity23FTup #-}++procRhythmicity23FHTup+  :: (Ord c) => Factors+  -> Double+  -> (Double -> c)+  -> [[[[Sound8]]] -> [[Double]]]+  -> String+  -> Coeffs2+  -> String+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> B.FuncRep2 ReadyForConstructionUkr Double c+procRhythmicity23FHTup ff k g syllableDurationsDs choice coeffs bbs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 = B.D (rhythmicityHTup ff k choice syllableDurationsDs coeffs bbs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17) g+{-# INLINE procRhythmicity23FHTup #-}
+ Phladiprelio/Ukrainian/PropertiesSyllablesG2.hs view
@@ -0,0 +1,60 @@+{-# OPTIONS_HADDOCK show-extensions #-}++-- |+-- Module      :  Phladiprelio.Ukrainian.PropertiesSyllablesG2+-- Copyright   :  (c) Oleksandr Zhabenko 2020-2023+-- License     :  MIT+-- Stability   :  Experimental+-- Maintainer  :  oleksandr.zhabenko@yahoo.com+--+-- Generalization and extension of the functionality of the DobutokO.Poetry.Norms+-- and DobutokO.Poetry.Norms.Extended modules+-- from the @dobutokO-poetry@ package. Uses syllables information.+-- Instead of the vector-related, uses just arrays.++{-# LANGUAGE NoImplicitPrelude #-}++module Phladiprelio.Ukrainian.PropertiesSyllablesG2 (+  -- * Rhythmicity properties extended+  -- ** Rhythmicity properties (semi-empirical)+  -- *** General ones+  rhythmicity0HTup+  , rhythmicity0FHTup+  , rhythmicityKHTup+  , rhythmicityKFHTup+  -- *** Simple one+  , rhythmicity0Tup+  , rhythmicity0FTup+  -- *** With weight coefficients+  , rhythmicityKTup+  , rhythmicityKFTup+  -- ** Rhythmicity properties from generated with r-glpk-phonetic-languages-ukrainian-durations package (since 0.2.0.0 version)+  -- *** Simple one+  , rhythmicity02Tup+  , rhythmicity02FTup+  -- *** With weight coefficients+  , rhythmicityK2Tup+  , rhythmicityKF2Tup+  -- ** NEW Rhythmicity properties from generated with r-glpk-phonetic-languages-ukrainian-durations package+  -- *** Simple ones+  , rhythmicity03Tup+  , rhythmicity03FTup+  , rhythmicity04Tup+  , rhythmicity04FTup+  -- *** With weight coefficients+  , rhythmicityK3Tup+  , rhythmicityKF3Tup+  , rhythmicityK4Tup+  , rhythmicityKF4Tup+  -- ** General+  , rhythmicityGTup+  , rhythmicityGHTup+  , rhythmicityTup+  , rhythmicityHTup+  , rhythmicityH'Tup+) where++import Phladiprelio.Ukrainian.PropertiesSyllablesG2Common+import Phladiprelio.Ukrainian.PropertiesSyllablesG201+import Phladiprelio.Ukrainian.PropertiesSyllablesG2H+import Phladiprelio.Ukrainian.PropertiesSyllablesG2Hprime
+ Phladiprelio/Ukrainian/PropertiesSyllablesG201.hs view
@@ -0,0 +1,634 @@+{-# OPTIONS_HADDOCK show-extensions #-}++-- |+-- Module      :  Phladiprelio.Ukrainian.PropertiesSyllablesG201+-- Copyright   :  (c) Oleksandr Zhabenko 2020-2023+-- License     :  MIT+-- Stability   :  Experimental+-- Maintainer  :  oleksandr.zhabenko@yahoo.com+--+-- Generalization and extension of the functionality of the DobutokO.Poetry.Norms+-- and DobutokO.Poetry.Norms.Extended modules+-- from the @dobutokO-poetry@ package. Uses syllables information.+-- Instead of the vector-related, uses just arrays.++{-# LANGUAGE NoImplicitPrelude, BangPatterns, MultiWayIf #-}++module Phladiprelio.Ukrainian.PropertiesSyllablesG201 (+  -- * Extended rhythmicity properties+  -- ** Rhythmicity properties (semi-empirical)+  -- *** General ones+  rhythmicity0HTup+  , rhythmicity0FHTup+  , rhythmicityKHTup+  , rhythmicityKFHTup+  -- *** Simple one+  , rhythmicity0Tup+  , rhythmicity0FTup+  -- *** With weight coefficients+  , rhythmicityKTup+  , rhythmicityKFTup+  -- ** Rhythmicity properties from generated with r-glpk-phonetic-languages-ukrainian-durations package (since 0.2.0.0 version)+  -- *** Simple one+  , rhythmicity02Tup+  , rhythmicity02FTup+  -- *** With weight coefficients+  , rhythmicityK2Tup+  , rhythmicityKF2Tup+  -- ** NEW Rhythmicity properties from generated with r-glpk-phonetic-languages-ukrainian-durations package+  -- *** Simple ones+  , rhythmicity03Tup+  , rhythmicity03FTup+  , rhythmicity04Tup+  , rhythmicity04FTup+  -- *** With weight coefficients+  , rhythmicityK3Tup+  , rhythmicityKF3Tup+  , rhythmicityK4Tup+  , rhythmicityKF4Tup+  -- ** General+  , rhythmicityGTup+) where++import GHC.Base+import Phladiprelio.Ukrainian.Common+import Phladiprelio.Ukrainian.SyllableDouble+import Phladiprelio.Ukrainian.Melodics (Sound8,FlowSound)+import Phladiprelio.Ukrainian.Syllable+import Phladiprelio.Ukrainian.PropertiesSyllablesG2Common+import GHC.Arr (Array)+import GHC.Int (Int8)+import Phladiprelio.Ukrainian.Emphasis+import Phladiprelio.Rhythmicity.Factor++rhythmicityGTup+  :: ([[[Sound8]]] -> [[Double]])-- ^ A function that specifies the syllables durations, analogue of (or one of) the+  -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package.+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> [Double]+rhythmicityGTup f tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (Str xs@(_:_)) = mconcat . f . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 $ xs+rhythmicityGTup f tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (FSL xsss@(_:_)) = mconcat . f $ xsss+rhythmicityGTup _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ = []+{-# INLINE rhythmicityGTup #-}++-----------------------------------------------------++rhythmicity0HTup+  :: ([[[Sound8]]] -> [[Double]])+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicity0HTup f = rhythmicityGHTup f eval23+{-# INLINE rhythmicity0HTup #-}++rhythmicity0HNTup n = rhythmicity0HTup + (case n of+   1 -> syllableDurationsD+   2 -> syllableDurationsD2+   3 -> syllableDurationsD3+   _ -> syllableDurationsD4)+{-# INLINE rhythmicity0HNTup #-}++rhythmicity0Tup+  :: Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicity0Tup = rhythmicity0HNTup 1+{-# INLINE rhythmicity0Tup #-}++rhythmicity02Tup+  :: Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicity02Tup = rhythmicity0HNTup 3+{-# INLINE rhythmicity02Tup #-}++rhythmicity03Tup+  :: Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicity03Tup = rhythmicity0HNTup 3+{-# INLINE rhythmicity03Tup #-}++rhythmicity04Tup+  :: Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicity04Tup = rhythmicity0HNTup 4+{-# INLINE rhythmicity04Tup #-}++-------------------------------------------------------++rhythmicityKHTup+  :: ([[[Sound8]]] -> [[Double]])+  -> Double+  -> Double+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicityKHTup f k2 k3 = rhythmicityGHTup f (eval23K k2 k3)+{-# INLINE rhythmicityKHTup #-}++rhythmicityKHNTup n = rhythmicityKHTup +  (case n of+   1 -> syllableDurationsD+   2 -> syllableDurationsD2+   3 -> syllableDurationsD3+   _ -> syllableDurationsD4)+{-# INLINE rhythmicityKHNTup #-}++rhythmicityKTup+  :: Double+  -> Double+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicityKTup = rhythmicityKHNTup 1+{-# INLINE rhythmicityKTup #-}++rhythmicityK2Tup+  :: Double+  -> Double+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicityK2Tup = rhythmicityKHNTup 2+{-# INLINE rhythmicityK2Tup #-}++rhythmicityK3Tup+  :: Double+  -> Double+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicityK3Tup = rhythmicityKHNTup 3+{-# INLINE rhythmicityK3Tup #-}++rhythmicityK4Tup+  :: Double+  -> Double+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicityK4Tup = rhythmicityKHNTup 4+{-# INLINE rhythmicityK4Tup #-}++--------------------------------------------------------++rhythmicity0FHTup+  :: ([[[Sound8]]] -> [[Double]])+  -> Factors+  -> Double+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicity0FHTup f ff k = rhythmicityGHTup f (eval23F ff k)+{-# INLINE rhythmicity0FHTup #-}++rhythmicity0FHNTup n = rhythmicity0FHTup + (case n of+   1 -> syllableDurationsD+   2 -> syllableDurationsD2+   3 -> syllableDurationsD3+   _ -> syllableDurationsD4)+{-# INLINE rhythmicity0FHNTup #-}++rhythmicity0FTup+  :: Factors+  -> Double+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicity0FTup = rhythmicity0FHNTup 1+{-# INLINE rhythmicity0FTup #-}++rhythmicity02FTup+  :: Factors+  -> Double+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicity02FTup = rhythmicity0FHNTup 2+{-# INLINE rhythmicity02FTup #-}++rhythmicity03FTup+  :: Factors+  -> Double+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicity03FTup = rhythmicity0FHNTup 3+{-# INLINE rhythmicity03FTup #-}++rhythmicity04FTup+  :: Factors+  -> Double+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicity04FTup = rhythmicity0FHNTup 4+{-# INLINE rhythmicity04FTup #-}++--------------------------------------------------------++rhythmicityKFHTup+  ::([[[Sound8]]] -> [[Double]])+  -> Factors+  -> Double+  -> Double+  -> Double+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicityKFHTup f ff k k2 k3 = rhythmicityGHTup f (eval23KF ff k k2 k3)+{-# INLINE rhythmicityKFHTup #-}++rhythmicityKFHNTup n = rhythmicityKFHTup+ (case n of+   1 -> syllableDurationsD+   2 -> syllableDurationsD2+   3 -> syllableDurationsD3+   _ -> syllableDurationsD4)+{-# INLINE rhythmicityKFHNTup #-}++rhythmicityKFTup+  :: Factors+  -> Double+  -> Double+  -> Double+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicityKFTup = rhythmicityKFHNTup 1+{-# INLINE rhythmicityKFTup #-}++rhythmicityKF2Tup+  :: Factors+  -> Double+  -> Double+  -> Double+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicityKF2Tup = rhythmicityKFHNTup 2+{-# INLINE rhythmicityKF2Tup #-}++rhythmicityKF3Tup+  :: Factors+  -> Double+  -> Double+  -> Double+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicityKF3Tup = rhythmicityKFHNTup 1+{-# INLINE rhythmicityKF3Tup #-}++rhythmicityKF4Tup+  :: Factors+  -> Double+  -> Double+  -> Double+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicityKF4Tup = rhythmicityKFHNTup 1+{-# INLINE rhythmicityKF4Tup #-}+
+ Phladiprelio/Ukrainian/PropertiesSyllablesG2Common.hs view
@@ -0,0 +1,52 @@+{-# OPTIONS_HADDOCK show-extensions #-}++-- |+-- Module      :  Phladiprelio.Ukrainian.PropertiesSyllablesG2Common+-- Copyright   :  (c) Oleksandr Zhabenko 2020-2023+-- License     :  MIT+-- Stability   :  Experimental+-- Maintainer  :  oleksandr.zhabenko@yahoo.com+--+-- Generalization and extension of the functionality of the DobutokO.Poetry.Norms+-- and DobutokO.Poetry.Norms.Extended modules+-- from the @dobutokO-poetry@ package. Uses syllables information.+-- Instead of the vector-related, uses just arrays.++{-# LANGUAGE NoImplicitPrelude, BangPatterns #-}++module Phladiprelio.Ukrainian.PropertiesSyllablesG2Common where++import GHC.Base+import Phladiprelio.Ukrainian.Melodics (Sound8,FlowSound)+import Phladiprelio.Ukrainian.Syllable+import GHC.Arr+import GHC.Int+import Phladiprelio.Ukrainian.Emphasis++rhythmicityGHTup+ :: ([[[Sound8]]] -> [[Double]])+ -> ([[Double]] -> Double)+ -> Array Int (Int8, Bool)+ -> Array Int (Int8, Bool)+ -> Array Int (Int8, Bool)+ -> Array Int (Int8, Bool)+ -> Array Int ([Int8], Bool)+ -> Array Int ([Int8], Int8)+ -> Array Int (Int8, FlowSound -> Sound8)+ -> Array Int (Int8, Bool)+ -> Array Int ([Int8], Bool)+ -> Array Int ([Int8], Bool)+ -> Array Int ([Int8], Bool)+ -> Array Int (Int8, [Int8])+ -> Array Int (Char,Int8)+ -> Array Int (Int8,[Int8])+ -> Array Int (Char, Bool)+ -> Array Int (Char, Bool)+ -> Array Int (Int8,Bool)+ -> ReadyForConstructionUkr+ -> Double+rhythmicityGHTup f g tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (Str xs@(_:_))+ = g . f . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 $ xs+rhythmicityGHTup f g _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ (FSL xsss@(_:_)) = g . f $ xsss +rhythmicityGHTup _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ = 0.0+{-# INLINE rhythmicityGHTup #-}
+ Phladiprelio/Ukrainian/PropertiesSyllablesG2H.hs view
@@ -0,0 +1,217 @@+{-# OPTIONS_HADDOCK show-extensions #-}++-- |+-- Module      :  Phladiprelio.Ukrainian.PropertiesSyllablesG2H+-- Copyright   :  (c) Oleksandr Zhabenko 2020-2023+-- License     :  MIT+-- Stability   :  Experimental+-- Maintainer  :  oleksandr.zhabenko@yahoo.com+--+-- Generalization and extension of the functionality of the DobutokO.Poetry.Norms+-- and DobutokO.Poetry.Norms.Extended modules+-- from the @dobutokO-poetry@ package. Uses syllables information.+-- Instead of the vector-related, uses just arrays.++{-# LANGUAGE NoImplicitPrelude, BangPatterns, MultiWayIf #-}++module Phladiprelio.Ukrainian.PropertiesSyllablesG2H (+  -- * General+  parseChRhEndMaybe+  -- * Extended general+  , rhythmicityTup+) where++import Data.Tuple (uncurry)+import GHC.Base+import GHC.List+import GHC.Real (rem)+import Phladiprelio.Ukrainian.Common+import Phladiprelio.Ukrainian.SyllableDouble+import Phladiprelio.Ukrainian.Melodics (Sound8,FlowSound)+import Phladiprelio.Ukrainian.Syllable+import Data.Maybe (fromMaybe)+import Text.Read (readMaybe)+import Phladiprelio.Rhythmicity.TwoFourth+import Phladiprelio.Rhythmicity.PolyRhythm+import Phladiprelio.Ukrainian.PropertiesSyllablesG201+import GHC.Arr (Array)+import GHC.Int (Int8)+import Phladiprelio.Ukrainian.Emphasis+import Phladiprelio.Coeffs+import qualified Logical.OrdConstraints as LO+import Phladiprelio.Rhythmicity.Factor++helperF4 :: Int -> [[[Sound8]]] -> [[Double]]+helperF4 n+ | n == 1 = syllableDurationsD+ | n == 2 = syllableDurationsD2+ | n == 3 = syllableDurationsD3+ | otherwise = syllableDurationsD4++----------------------------------------------------------------++rhythmicityTup+  :: Factors+  -> Double+  -> String+  -> Coeffs2+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicityTup ff k choice@(t1:t2@(t3:t4@(t5:jis))) CF0 tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt@(Str tttts)+ | LO.ordCs2HPred1 [LO.O "cMN", LO.C "AF"] t1 = let just_probe = readRhythmicity choice in+           case just_probe of+             Just (P1 ch rh n) -> rhythmicityABC 1.0 2.0 0.125 ch rh . mconcat . -- the latter one is to be interchanged with weights2SyllableDurationsD+               (helperF4 n) . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 $ tttts+             Just (P2 ch rh r n) -> (case t1 of+                   'A' -> rhythmicityPolyWeightedLEF2+                   'D' -> rhythmicityPolyWeightedLF2+                   'E' -> rhythmicityPolyWeightedLEF3+                   'F' -> rhythmicityPolyWeightedLF3+                   'B' -> rhythmicityPolyWeightedEF2+                   'C' -> rhythmicityPolyWeightedF2+                   'M' -> rhythmicityPolyWeightedEF3+                   'N' -> rhythmicityPolyWeightedF3+                   'c' -> rhythmicityPoly) 1.0 r ch rh . mconcat . (helperF4 n) . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 $ tttts+             _ -> rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | t1 == '0' = +     (case t2 of+      "2y" -> rhythmicity02Tup +      "3y" -> rhythmicity03Tup +      "2f" -> rhythmicity02FTup ff k+      "3f" -> rhythmicity03FTup ff k+      "4f" -> rhythmicity04FTup ff k+      _ -> rhythmicity04Tup) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | t1 `elem` "wx" = if+          | t5 >= '1' && t5 <= '4' ->   if t3 >= '0' && t3 <= '3'  then uncurry (wwF t4 tttts) (case t3 of+             '0' -> (Ch 1 1 4, Rhythm 1 1 2)+             '1' -> (Ch 1 0 4, Rhythm 2 1 1)+             '2' -> (Ch 0 1 4, Rhythm 1 2 1)+             '3' -> (Ch 0 0 4, Rhythm 1 1 2)) +                else rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+          | otherwise -> rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | LO.ordCs2HPred1 [LO.O "bz", LO.C "degvIZ"] t1 && t5 >= '1' && t5 <= '4' =+        (case t1 of+          'b' -> g rhythmicityPolyWeightedLEF3 5 1+          'd' -> g rhythmicityPolyWeightedLEF30 5 1+          'e' -> g rhythmicityPolyWeightedLEF3 6 2+          'g' -> g rhythmicityPolyWeightedLEF2 5 1+          'h' -> g rhythmicityPolyWeightedLEF20 5 1+          'i' -> g rhythmicityPolyWeightedLEF2 6 2+          'j' -> g rhythmicityPolyWeightedLEF20 6 2+          'k' -> g rhythmicityPolyWeightedLF3 5 1+          'l' -> g rhythmicityPolyWeightedLF30 5 1+          'm' -> g rhythmicityPolyWeightedLF3 6 2+          'n' -> g rhythmicityPolyWeightedLF30 6 2+          'o' -> g rhythmicityPolyWeightedLF2 5 1+          'p' -> g rhythmicityPolyWeightedLF20 5 1+          'q' -> g rhythmicityPolyWeightedLF2 6 2+          'r' -> g rhythmicityPolyWeightedLF20 6 2+          'I' -> g rhythmicityPolyWeightedEF3 5 1+          'J' -> g rhythmicityPolyWeightedEF30 5 1+          'K' -> g rhythmicityPolyWeightedEF3 6 2+          'L' -> g rhythmicityPolyWeightedEF30 6 2+          'O' -> g rhythmicityPolyWeightedEF2 5 1+          'P' -> g rhythmicityPolyWeightedEF20 5 1+          'Q' -> g rhythmicityPolyWeightedEF2 6 2+          'R' -> g rhythmicityPolyWeightedEF20 6 2+          'W' -> g rhythmicityPolyWeightedF3 5 1+          'X' -> g rhythmicityPolyWeightedF30 5 1+          'Y' -> g rhythmicityPolyWeightedF3 6 2+          'Z' -> g rhythmicityPolyWeightedF30 6 2+          'U' -> g rhythmicityPolyWeightedF2 5 1+          'V' -> g rhythmicityPolyWeightedF20 5 1+          'S' -> g rhythmicityPolyWeightedF2 6 2+          'T' -> g rhythmicityPolyWeightedF20 6 2+          'u' -> g rhythmicityPoly 5 1+          'v' -> g rhythmicityPoly0 5 1+          's' -> g rhythmicityPoly 6 2+          't' -> g rhythmicityPoly0 6 2+          'z' -> g rhythmicityPolyWeightedLEF30 6 2) tttts+ | otherwise = rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+        where h1 f ts xs m n = f 1.0 4 (PolyCh xs m) (PolyRhythm [1,2,1,n]) . mconcat . (case readMaybe ts::Maybe Int of { Just 1 -> syllableDurationsD ; Just 2 -> syllableDurationsD2 ; Just 3 -> syllableDurationsD3 ; Just 4 -> syllableDurationsD4 }) . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17+              h2 f ts xs m n = f 1.0 4 (PolyCh xs m) (PolyRhythm [2,1,1,n]) . mconcat . (case readMaybe ts::Maybe Int of { Just 1 -> syllableDurationsD ; Just 2 -> syllableDurationsD2 ; Just 3 -> syllableDurationsD3 ; Just 4 -> syllableDurationsD4 }) . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17+              g f m n+                | t3 >= '0' && t3 <= '3' && t5 >= '1' && t5 <= '4' = h1 f t4 +                   (case t3 of+                      '0' -> [True,True,True]+                      '1' -> [True,True,False]+                      '2' -> [True,False,True]+                      '3' -> [True,False,False]) m n+                | t3 >= '4' && t3 <= '7' && t5 >= '1' && t5 <= '4' = h2 f t4 +                   (case t3 of+                      '4' -> [False,False,True]+                      '5' -> [False,True,False]+                      '6' -> [False,True,True]+                      '7' -> [False,False,False]) m n+                | otherwise = \_ -> rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+              w1F f tttts ch rh = (if t1 == 'w' then rhythmicityABC else rhythmicityABC0) 1.0 2.0 0.125 ch rh . mconcat . f . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 $ tttts+              wwF2 g2 xs = let (Just n) = readMaybe xs::Maybe Int in g2 +                      (case n `rem` 4 of +                       1 -> syllableDurationsD+                       2 -> syllableDurationsD2+                       3 -> syllableDurationsD3+                       _ -> syllableDurationsD4)+              wwF = wwF2 w1F+              {-# INLINE w1F #-}+              {-# INLINE wwF2 #-}+              {-# INLINE wwF #-}+rhythmicityTup ff k choice@(t1:t2@(t3:t4@(t5:jis))) (CF2 x y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt@(Str tttts) + | t1 == '0' = +     (case t2 of+       "2y" -> rhythmicityK2Tup+       "3y" -> rhythmicityK3Tup+       "2f" -> rhythmicityKF2Tup ff k+       "3f" -> rhythmicityKF3Tup ff k+       "4f" -> rhythmicityKF4Tup ff k+       _ -> rhythmicityK4Tup) (fromMaybe 1.0 x) (fromMaybe 1.0 y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | t1 `elem` "wx" = if t5 >= '1' && t5 <= '4' then  if t3 >= '0' && t3 <= '3'  then uncurry (wwF t4 tttts) (case t3 of+             '0' -> (Ch 1 1 4, Rhythm 1 1 2)+             '1' -> (Ch 1 0 4, Rhythm 2 1 1)+             '2' -> (Ch 0 1 4, Rhythm 1 2 1)+             '3' -> (Ch 0 0 4, Rhythm 1 1 2)) +                else rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+     else rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | LO.ordCs2HPred1 [LO.O "bz", LO.C "begvAFIZ" ] t1 = rhythmicityTup ff k choice CF0 tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | otherwise = rhythmicityK4Tup (fromMaybe 1.0 x) (fromMaybe 1.0 y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+              where w1F f tttts ch rh = (if t1 == 'w' then rhythmicityABC else rhythmicityABC0) 1.0 (fromMaybe 2.0 x) (fromMaybe 0.125 y) ch rh . mconcat . f . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 $ tttts+                    wwF xs = let (Just n) = readMaybe xs::Maybe Int in w1F +                      (case n `rem` 4 of+                       1 -> syllableDurationsD+                       2 -> syllableDurationsD2+                       3 -> syllableDurationsD3+                       _ -> syllableDurationsD4)+                    {-# INLINE w1F #-}+                    {-# INLINE wwF #-}+rhythmicityTup ff k choice@(t1:t2@(t3:jis)) CF0 tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt@(Str tttts)+ | t1 == '0' = +     (case t2 of+      "y" -> rhythmicity0Tup+      "f" -> rhythmicity0FTup ff k+      _ -> rhythmicity04Tup) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | otherwise =  rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+rhythmicityTup ff k choice@(t1:t2@(t3:jis)) (CF2 x y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt@(Str tttts)+ | t1 == '0' = +     (case t2 of+      "y" -> rhythmicityKTup+      "f" -> rhythmicityKFTup ff k+      _ -> rhythmicityK4Tup) (fromMaybe 1.0 x) (fromMaybe 1.0 y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | otherwise =  rhythmicityK4Tup (fromMaybe 1.0 x) (fromMaybe 1.0 y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+rhythmicityTup ff k choice tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 _ _ = -1.0+
+ Phladiprelio/Ukrainian/PropertiesSyllablesG2Hprime.hs view
@@ -0,0 +1,463 @@+{-# OPTIONS_HADDOCK show-extensions #-}++-- |+-- Module      :  Phladiprelio.Ukrainian.PropertiesSyllablesG2Hprime+-- Copyright   :  (c) Oleksandr Zhabenko 2020-2023+-- License     :  MIT+-- Stability   :  Experimental+-- Maintainer  :  oleksandr.zhabenko@yahoo.com+--+-- Generalization and extension of the functionality of the DobutokO.Poetry.Norms+-- and DobutokO.Poetry.Norms.Extended modules+-- from the @dobutokO-poetry@ package. Uses syllables information.+-- Instead of the vector-related, uses just arrays.++{-# LANGUAGE NoImplicitPrelude, BangPatterns, MultiWayIf #-}++module Phladiprelio.Ukrainian.PropertiesSyllablesG2Hprime (+  -- * Extended+  rhythmicityHTup+  , rhythmicityH'Tup+  , rhythmicitya'Tup+) where++import Data.Tuple (uncurry)+import GHC.Base+import GHC.List+import GHC.Real (rem)+import GHC.Num ((-))+import Phladiprelio.Ukrainian.Common+import Phladiprelio.Ukrainian.SyllableDouble+import Phladiprelio.Ukrainian.Melodics (Sound8,FlowSound)+import Phladiprelio.Ukrainian.Syllable+import Data.Maybe (fromMaybe)+import Text.Read (readMaybe)+import Phladiprelio.Rhythmicity.TwoFourth+import Phladiprelio.Rhythmicity.PolyRhythm+import Phladiprelio.Ukrainian.PropertiesSyllablesG201+import GHC.Arr (Array)+import GHC.Int (Int8)+import Phladiprelio.Ukrainian.Emphasis+import Phladiprelio.Coeffs+import Phladiprelio.Rhythmicity.Factor+import Phladiprelio.Ukrainian.PropertiesSyllablesG2H+import qualified Logical.OrdConstraints as L++helperHG :: Bool ->  Int -> [[[[Sound8]]] -> [[Double]]] -> [[[Sound8]]] -> [[Double]]+helperHG bool n xs+  | null xs = if bool then syllableDurationsD4 else (\_ -> [])+  | (n `rem` length xs) == 0 = head xs+  | otherwise = xs !! ((n `rem` length xs) - 1)++helperHF4 :: Int -> [[[[Sound8]]] -> [[Double]]] -> [[[Sound8]]] -> [[Double]]+helperHF4 = helperHG True+{-# INLINE helperHF4 #-}++helperHF1 :: Int -> [[[[Sound8]]] -> [[Double]]] -> [[[Sound8]]] -> [[Double]]+helperHF1 = helperHG False+{-# INLINE helperHF1 #-}++-----------------------------------------------------------++-- | Partially defined auxiliary function to reduce code duplication.+helpF1 bool choice@(c1:_) syllableDurationsDs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt = let just_probe = readRhythmicity choice in+           (case just_probe of+             Just (P1 ch rh n) -> rhythmicityABC 1.0 2.0 0.125 ch rh . rhythmicityGTup (helperHG bool n syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 +             Just (P2 ch rh r n) -> (case c1 of+                   'A' -> rhythmicityPolyWeightedLEF2+                   'D' -> rhythmicityPolyWeightedLF2+                   'E' -> rhythmicityPolyWeightedLEF3+                   'F' -> rhythmicityPolyWeightedLF3+                   'B' -> rhythmicityPolyWeightedEF2+                   'C' -> rhythmicityPolyWeightedF2+                   'M' -> rhythmicityPolyWeightedEF3+                   'N' -> rhythmicityPolyWeightedF3+                   'c' -> rhythmicityPoly) 1.0 r ch rh . rhythmicityGTup (helperHG bool n syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17+             _ -> rhythmicity0HTup (helperHG bool 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17) tttt++-- | Partially defined auxiliary function to reduce code duplication.+helpG1 choice@(c1:c2@(c3:c4@(c5:cs))) syllableDurationsDs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt = + (case c1 of+   'b' -> g rhythmicityPolyWeightedLEF3 5 1+   'd' -> g rhythmicityPolyWeightedLEF30 5 1+   'e' -> g rhythmicityPolyWeightedLEF3 6 2+   'g' -> g rhythmicityPolyWeightedLEF2 5 1+   'h' -> g rhythmicityPolyWeightedLEF20 5 1+   'i' -> g rhythmicityPolyWeightedLEF2 6 2+   'j' -> g rhythmicityPolyWeightedLEF20 6 2+   'k' -> g rhythmicityPolyWeightedLF3 5 1+   'l' -> g rhythmicityPolyWeightedLF30 5 1+   'm' -> g rhythmicityPolyWeightedLF3 6 2+   'n' -> g rhythmicityPolyWeightedLF30 6 2+   'o' -> g rhythmicityPolyWeightedLF2 5 1+   'p' -> g rhythmicityPolyWeightedLF20 5 1+   'q' -> g rhythmicityPolyWeightedLF2 6 2+   'r' -> g rhythmicityPolyWeightedLF20 6 2+   'I' -> g rhythmicityPolyWeightedEF3 5 1+   'J' -> g rhythmicityPolyWeightedEF30 5 1+   'K' -> g rhythmicityPolyWeightedEF3 6 2+   'L' -> g rhythmicityPolyWeightedEF30 6 2+   'O' -> g rhythmicityPolyWeightedEF2 5 1+   'P' -> g rhythmicityPolyWeightedEF20 5 1+   'Q' -> g rhythmicityPolyWeightedEF2 6 2+   'R' -> g rhythmicityPolyWeightedEF20 6 2+   'W' -> g rhythmicityPolyWeightedF3 5 1+   'X' -> g rhythmicityPolyWeightedF30 5 1+   'Y' -> g rhythmicityPolyWeightedF3 6 2+   'Z' -> g rhythmicityPolyWeightedF30 6 2+   'U' -> g rhythmicityPolyWeightedF2 5 1+   'V' -> g rhythmicityPolyWeightedF20 5 1+   'S' -> g rhythmicityPolyWeightedF2 6 2+   'T' -> g rhythmicityPolyWeightedF20 6 2+   'u' -> g rhythmicityPoly 5 1+   'v' -> g rhythmicityPoly0 5 1+   's' -> g rhythmicityPoly 6 2+   't' -> g rhythmicityPoly0 6 2+   'z' -> g rhythmicityPolyWeightedLEF30 6 2)+       where h1 f ts xs m n = f 1.0 4 (PolyCh xs m) (PolyRhythm [1,2,1,n]) . mconcat .+                 (let q = readMaybe c4::Maybe Int in+                     case q of {Just q' -> helperHF1 q' syllableDurationsDs; ~Nothing -> (\_ -> [[-1.0]]) })+             h2 f ts xs m n = f 1.0 4 (PolyCh xs m) (PolyRhythm [2,1,1,n]) . mconcat .+                 (let q = readMaybe c4::Maybe Int in+                     case q of {Just q' -> helperHF1 q' syllableDurationsDs; ~Nothing -> (\_ -> [[-1.0]]) })+             g f m n+               | c3 == '0' = h1 f [c5] [True,True,True] m n+               | c3 == '1' = h1 f [c5] [True,True,False] m n+               | c3 == '2' = h1 f [c5] [True,False,True] m n+               | c3 == '3' = h1 f [c5] [True,False,False] m n+               | c3 == '4' = h2 f [c5] [False,False,True] m n+               | c3 == '5' = h2 f [c5] [False,True,False] m n+               | c3 == '6' = h2 f [c5] [False,True,True] m n+               | c3 == '7' = h2 f [c5] [False,False,False] m n+               | otherwise = \_ -> rhythmicity0HTup (helperHF1 n syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+++{-|+-}+rhythmicityHTup+  :: Factors+  -> Double+  -> String+  -> [[[[Sound8]]] -> [[Double]]]+  -> Coeffs2+  -> String+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicityHTup ff k choice syllableDurationsDs coeffs bbs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 +  | any (== 'a') choice = rhythmicitya'Tup ff k (filter (\c -> c /='a' && c /=  'H') choice) syllableDurationsDs coeffs bbs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 +  | any (== 'H') choice = rhythmicityH'Tup ff k (filter (/= 'H') choice) syllableDurationsDs coeffs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 +  | otherwise = rhythmicityTup ff k choice coeffs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 ++rhythmicityH'Tup+  :: Factors+  -> Double+  -> String+  -> [[[[Sound8]]] -> [[Double]]]+  -> Coeffs2+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicityH'Tup ff k choice@(c1:c2@(c3:c4@(c5:cs))) syllableDurationsDs CF0 tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt@(Str tttts) + | L.ordCs2HPred1 [L.O "cMN", L.C "AF"] c1  = helpF1 True choice syllableDurationsDs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt + | c1 == '0' && c4 == "y" =+    let n2 = readMaybe [c3]::Maybe Int in+      rhythmicity0HTup (helperHF4 (case n2 of { Just n3 -> n3; Nothing -> 1}) syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | c1 == '0' && c4 == "f" =+    let n2 = readMaybe [c3]::Maybe Int in+      rhythmicity0FHTup (helperHF4 (case n2 of { Just n3 -> n3; Nothing -> 1}) syllableDurationsDs) ff k  tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | c1 == '0' = rhythmicity0HTup (helperHF4 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | c1 `elem` "wx" = if+          | c4 >= "1" && c4 <= "4" -> if c3 >= '0' && c3 <= '3'  then uncurry (wwF c4 tttts) (case c3 of+             '0' -> (Ch 1 1 4, Rhythm 1 1 2)+             '1' -> (Ch 1 0 4, Rhythm 2 1 1)+             '2' -> (Ch 0 1 4, Rhythm 1 2 1)+             '3' -> (Ch 0 0 4, Rhythm 1 1 2)) +                else rhythmicity0HTup (helperHF4 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+          | otherwise -> rhythmicity0HTup (helperHF4 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | L.ordCs2HPred1 [L.O "bz", L.C "degvIZ"] c1 && c4 >= "1" && c4 <= "9" =+        (case c1 of+          'b' -> g rhythmicityPolyWeightedLEF3 5 1+          'd' -> g rhythmicityPolyWeightedLEF30 5 1+          'e' -> g rhythmicityPolyWeightedLEF3 6 2+          'g' -> g rhythmicityPolyWeightedLEF2 5 1+          'h' -> g rhythmicityPolyWeightedLEF20 5 1+          'i' -> g rhythmicityPolyWeightedLEF2 6 2+          'j' -> g rhythmicityPolyWeightedLEF20 6 2+          'k' -> g rhythmicityPolyWeightedLF3 5 1+          'l' -> g rhythmicityPolyWeightedLF30 5 1+          'm' -> g rhythmicityPolyWeightedLF3 6 2+          'n' -> g rhythmicityPolyWeightedLF30 6 2+          'o' -> g rhythmicityPolyWeightedLF2 5 1+          'p' -> g rhythmicityPolyWeightedLF20 5 1+          'q' -> g rhythmicityPolyWeightedLF2 6 2+          'r' -> g rhythmicityPolyWeightedLF20 6 2+          'I' -> g rhythmicityPolyWeightedEF3 5 1+          'J' -> g rhythmicityPolyWeightedEF30 5 1+          'K' -> g rhythmicityPolyWeightedEF3 6 2+          'L' -> g rhythmicityPolyWeightedEF30 6 2+          'O' -> g rhythmicityPolyWeightedEF2 5 1+          'P' -> g rhythmicityPolyWeightedEF20 5 1+          'Q' -> g rhythmicityPolyWeightedEF2 6 2+          'R' -> g rhythmicityPolyWeightedEF20 6 2+          'W' -> g rhythmicityPolyWeightedF3 5 1+          'X' -> g rhythmicityPolyWeightedF30 5 1+          'Y' -> g rhythmicityPolyWeightedF3 6 2+          'Z' -> g rhythmicityPolyWeightedF30 6 2+          'U' -> g rhythmicityPolyWeightedF2 5 1+          'V' -> g rhythmicityPolyWeightedF20 5 1+          'S' -> g rhythmicityPolyWeightedF2 6 2+          'T' -> g rhythmicityPolyWeightedF20 6 2+          'u' -> g rhythmicityPoly 5 1+          'v' -> g rhythmicityPoly0 5 1+          's' -> g rhythmicityPoly 6 2+          't' -> g rhythmicityPoly0 6 2+          'z' -> g rhythmicityPolyWeightedLEF30 6 2) tttts+ | otherwise = rhythmicity0HTup (let q = readMaybe c4::Maybe Int in+              case q of {Just q' -> helperHF4 q' syllableDurationsDs; ~Nothing -> syllableDurationsD4 }) +                 tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+        where h1 f ts xs m n = f 1.0 4 (PolyCh xs m) (PolyRhythm [1,2,1,n]) . mconcat .+                  (let q = readMaybe c4::Maybe Int in+                      case q of {Just q' -> helperHF4 q' syllableDurationsDs; ~Nothing -> syllableDurationsD4 }) .+                        createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17+              h2 f ts xs m n = f 1.0 4 (PolyCh xs m) (PolyRhythm [2,1,1,n]) . mconcat .+                  (let q = readMaybe c4::Maybe Int in+                      case q of {Just q' -> helperHF4 q' syllableDurationsDs; ~Nothing -> syllableDurationsD4 }) .+                        createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17+              g f m n+                | c3 == '0' = h1 f c4 [True,True,True] m n+                | c3 == '1' = h1 f c4 [True,True,False] m n+                | c3 == '2' = h1 f c4 [True,False,True] m n+                | c3 == '3' = h1 f c4 [True,False,False] m n+                | c3 == '4' = h2 f c4 [False,False,True] m n+                | c3 == '5' = h2 f c4 [False,True,False] m n+                | c3 == '6' = h2 f c4 [False,True,True] m n+                | c3 == '7' = h2 f c4 [False,False,False] m n+                | otherwise = \_ -> rhythmicity0HTup  (helperHF4 n syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+              w1F f tttts ch rh = (if c1 == 'w' then rhythmicityABC else rhythmicityABC0) 1.0 2.0 0.125 ch rh . mconcat . f . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 $ tttts+              wwF2 g2 xs =+                let n1 = readMaybe xs::Maybe Int in+                   case n1 of+                     Just n2 -> g2 (helperHF4 n2 syllableDurationsDs)+                     Nothing -> g2 syllableDurationsD4+              wwF = wwF2 w1F+              {-# INLINE w1F #-}+              {-# INLINE wwF2 #-}+              {-# INLINE wwF #-}+rhythmicityH'Tup ff k choice@(c1:c2@(c3:c4@(c5:cs))) syllableDurationsDs (CF2 x y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  tttt@(Str tttts) + | c1 `elem` "wx" =  if+          | c5 >= '1' && c5 <= '4' ->  if c3 >= '0' && c3 <= '3'  then uncurry (wwF c4 tttts) (case c3 of+             '0' -> (Ch 1 1 4, Rhythm 1 1 2)+             '1' -> (Ch 1 0 4, Rhythm 2 1 1)+             '2' -> (Ch 0 1 4, Rhythm 1 2 1)+             '3' -> (Ch 0 0 4, Rhythm 1 1 2)) +                else rhythmicity0HTup (helperHF4 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+          | otherwise -> rhythmicity0HTup (helperHF4 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | c1 == '0' = if c2 `elem` ["2f","3f","4f"] then rhythmicityKFHTup (helperHF4 (case c5 of {'2' -> 2; '3' -> 3; '4' -> 4; ~rrrrr -> 1}) syllableDurationsDs) ff k+             (fromMaybe 1.0 x) (fromMaybe 1.0 y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+          else rhythmicityKHTup (helperHF4 (case c5 of {'2' -> 2; '3' -> 3; '4' -> 4; ~rrrrr -> 1}) syllableDurationsDs) (fromMaybe 1.0 x) (fromMaybe 1.0 y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ |  L.ordCs2HPred1 [L.O "z", L.C "begvAFIZ"] c1 = rhythmicityH'Tup ff k choice syllableDurationsDs CF0 tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | otherwise = rhythmicityKHTup (let q = readMaybe c4::Maybe Int in case q of {Just q' -> helperHF4 q' syllableDurationsDs; ~Nothing -> syllableDurationsD4 }) (fromMaybe 1.0 x) (fromMaybe 1.0 y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+                  where w1F f tttts ch rh = (if c1 == 'w' then rhythmicityABC else rhythmicityABC0) 1.0 (fromMaybe 2.0 x) (fromMaybe 0.125 y) ch rh . mconcat . f . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 $ tttts+                        wwF xs =+                         let n1 = readMaybe xs::Maybe Int in+                           case n1 of+                            Just n2 -> w1F (helperHF4 n2 syllableDurationsDs)+                            Nothing -> w1F syllableDurationsD4+                        {-# INLINE w1F #-}+                        {-# INLINE wwF #-}+rhythmicityH'Tup ff k choice@(c1:c2@(c3:cs)) syllableDurationsDs CF0 tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt@(Str tttts)+ | choice == "0y" = rhythmicity0HTup (helperHF4 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | choice == "0f" = rhythmicity0FHTup (helperHF4 1 syllableDurationsDs) ff k tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | otherwise = rhythmicity0HTup  (helperHF4 4 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+rhythmicityH'Tup ff k choice@(c1:c2@(c3:cs)) syllableDurationsDs (CF2 x y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  tttt@(Str tttts) + | choice == "0f" = rhythmicityKFHTup (helperHF4 1 syllableDurationsDs) ff k (fromMaybe 1.0 x) (fromMaybe 1.0 y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | choice == "0y" = rhythmicityKHTup (helperHF4 1 syllableDurationsDs) (fromMaybe 1.0 x) (fromMaybe 1.0 y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | otherwise = rhythmicity0HTup  (helperHF4 4 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+rhythmicityH'Tup _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ = -3.0++rhythmicitya'Tup+  :: Factors+  -> Double+  -> String+  -> [[[[Sound8]]] -> [[Double]]]+  -> Coeffs2+  -> String+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Int8)+  -> Array Int (Int8, FlowSound -> Sound8)+  -> Array Int (Int8, Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int ([Int8], Bool)+  -> Array Int (Int8, [Int8])+  -> Array Int (Char,Int8)+  -> Array Int (Int8,[Int8])+  -> Array Int (Char, Bool)+  -> Array Int (Char, Bool)+  -> Array Int (Int8,Bool)+  -> ReadyForConstructionUkr+  -> Double+rhythmicitya'Tup ff k choice@(c1:c2@(c3:c4@(c5:cs))) syllableDurationsDs CF0 bbs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt@(FSL tttts)+ | L.ordCs2HPred1 [L.O "cMN", L.C "AF"] c1 = helpF1 False choice syllableDurationsDs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt + | c1 == '0' && c5 == 'y' =+    let n2 = readMaybe [c3]::Maybe Int in+      rhythmicity0HTup (helperHF1 (case n2 of {Just n3 -> n3; Nothing -> 1}) syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | c1 == '0' && c5 == 'f' =+    let n2 = readMaybe [c3]::Maybe Int in+      rhythmicity0FHTup (helperHF1 (case n2 of {Just n3 -> n3; Nothing -> 1}) syllableDurationsDs) ff k tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | c1 == '0' = rhythmicity0HTup (helperHF1 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | c1 `elem` "wx" = if+          | c5 >= '1' && c5 <= '4' ->  if c3 >= '0' && c3 <= '3'  then uncurry (wwF c4 tttts) (case c3 of+             '0' -> (Ch 1 1 4, Rhythm 1 1 2)+             '1' -> (Ch 1 0 4, Rhythm 2 1 1)+             '2' -> (Ch 0 1 4, Rhythm 1 2 1)+             '3' -> (Ch 0 0 4, Rhythm 1 1 2)) +                else rhythmicity0HTup (helperHF1 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+          | otherwise -> rhythmicity0HTup  (helperHF1 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | (L.ordCs2HPred1 [L.O "z", L.C "begvIZ"] c1) && c5 >= '1' && c5 <= '9' =+        (helpG1 choice syllableDurationsDs  tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt) tttts+ | otherwise = rhythmicity0HTup (let q = readMaybe c4::Maybe Int in+              case q of {Just q' -> helperHF1 q' syllableDurationsDs; ~Nothing -> (\_ -> [[-1.0]]) }) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 +                   tup13 tup14 tup15 tup16 tup17 tttt+        where w1F f tttts ch rh = (if c1 == 'w' then rhythmicityABC else rhythmicityABC0) 1.0 2.0 0.125 ch rh . mconcat . f $ tttts+              wwF2 g2 xs =+                let n1 = readMaybe xs::Maybe Int in+                   case n1 of+                     Just n2 -> g2 (helperHF1 n2 syllableDurationsDs)+                     Nothing -> g2 (\_ -> [[-1.0]])+              wwF = wwF2 w1F+              {-# INLINE w1F #-}+              {-# INLINE wwF2 #-}+              {-# INLINE wwF #-}+rhythmicitya'Tup ff k choice@(c1:c2@(c3:c4@(c5:cs))) syllableDurationsDs (CF2 x y) bbs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt@(FSL tttts) + | c1 `elem` "wx" =  if+          | c5 >= '1' && c5 <= '4' -> if c3 >= '0' && c3 <= '3'  then uncurry (wwF c4 tttts) (case c3 of+             '0' -> (Ch 1 1 4, Rhythm 1 1 2)+             '1' -> (Ch 1 0 4, Rhythm 2 1 1)+             '2' -> (Ch 0 1 4, Rhythm 1 2 1)+             '3' -> (Ch 0 0 4, Rhythm 1 1 2)) +                else rhythmicity0HTup (helperHF1 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+          | otherwise -> rhythmicity0HTup  (helperHF1 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | c1 == '0' = if c2 `elem` ["2f","3f","4f"] then rhythmicityKFHTup (helperHF1 (case c5 of {'2' -> 2; '3' -> 3; '4' -> 4; ~rrrrr -> 1}) syllableDurationsDs) ff k +          (fromMaybe 1.0 x) (fromMaybe 1.0 y)tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  tttt+         else rhythmicityKHTup (helperHF1 (case c5 of {'2' -> 2; '3' -> 3; '4' -> 4; ~rrrrr -> 1}) syllableDurationsDs) (fromMaybe 1.0 x) (fromMaybe 1.0 y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | L.ordCs2HPred1 [L.O "z",L.C "begvAFIZ"] c1 = rhythmicityH'Tup ff k choice syllableDurationsDs CF0 tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | otherwise = rhythmicityKHTup (let q = readMaybe c4::Maybe Int in+              case q of {Just q' -> helperHF1 q' syllableDurationsDs; ~Nothing -> (\_ -> [[-1.0]]) })+                (fromMaybe 1.0 x) (fromMaybe 1.0 y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+               where w1F f tttts ch rh = (if c1 == 'w' then rhythmicityABC else rhythmicityABC0) 1.0 (fromMaybe 2.0 x) (fromMaybe 0.125 y) ch rh . mconcat . f $ tttts+                     wwF xs =+                       let n1 = readMaybe xs::Maybe Int in+                         case n1 of+                          Just n2 -> w1F (helperHF1 n2 syllableDurationsDs)+                          Nothing -> w1F (\_ -> [[-1.0]])+                     {-# INLINE w1F #-}+                     {-# INLINE wwF #-}+rhythmicitya'Tup ff k choice@(c1:c2@(c3:c4@(c5:cs))) syllableDurationsDs CF0 bbs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt@(Str tttts@(_:_))+ | c1 `elem` "cMN" || (c1 >= 'A' && c1 <= 'F') = helpF1 False choice syllableDurationsDs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt + | c1 == '0' && c5 == 'y' =+    let n2 = readMaybe [c3]::Maybe Int in+      rhythmicity0HTup (helperHF1 (case n2 of {Just n3 -> n3; Nothing -> 1}) syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | c1 == '0' && c5 == 'f' =+    let n2 = readMaybe [c3]::Maybe Int in+      rhythmicity0FHTup  (helperHF1 (case n2 of {Just n3 -> n3; Nothing -> 1}) syllableDurationsDs) ff k tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | c1 == '0' = rhythmicity0HTup (helperHF1 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  tttt+ | c1 `elem` "wx" = if+          | c5 >= '1' && c5 <= '4' ->  if c3 >= '0' && c3 <= '3'  then uncurry (wwF c4 tttts) (case c3 of+             '0' -> (Ch 1 1 4, Rhythm 1 1 2)+             '1' -> (Ch 1 0 4, Rhythm 2 1 1)+             '2' -> (Ch 0 1 4, Rhythm 1 2 1)+             '3' -> (Ch 0 0 4, Rhythm 1 1 2)) +                else rhythmicity0HTup  (helperHF1 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+          | otherwise -> rhythmicity0HTup  (helperHF1 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | L.ordCs2HPred1 [L.O "bz", L.C "degvIZ"] c1 && c5 >= '1' && c5 <= '9' =+        (helpG1 choice syllableDurationsDs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt) . convFI bbs $  tttts+ | otherwise = rhythmicity0HTup (let q = readMaybe c4::Maybe Int in+              case q of {Just q' -> helperHF1 q' syllableDurationsDs; ~Nothing -> (\_ -> [[-1.0]]) }) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+        where w1F f tttts ch rh = (if c1 == 'w' then rhythmicityABC else rhythmicityABC0) 1.0 2.0 0.125 ch rh . mconcat . f $ tttts+              wwF2 g2 xs =+                let n1 = readMaybe xs::Maybe Int in+                   case n1 of+                     Just n2 -> g2 (helperHF1 n2 syllableDurationsDs . convFI bbs)+                     Nothing -> g2 (\_ -> [[-1.0]])+              wwF = wwF2 w1F+              {-# INLINE w1F #-}+              {-# INLINE wwF2 #-}+              {-# INLINE wwF #-}+rhythmicitya'Tup ff k choice@(c1:c2@(c3:c4@(c5:cs))) syllableDurationsDs (CF2 x y) bbs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt@(Str tttts@(_:_)) + | c1 `elem` "wx" = if+          | c5 >= '1' && c5 <= '4' ->  if c3 >= '0' && c3 <= '3'  then uncurry (wwF c4 tttts) (case c3 of+             '0' -> (Ch 1 1 4, Rhythm 1 1 2)+             '1' -> (Ch 1 0 4, Rhythm 2 1 1)+             '2' -> (Ch 0 1 4, Rhythm 1 2 1)+             '3' -> (Ch 0 0 4, Rhythm 1 1 2)) +                else rhythmicity0HTup  (helperHF1 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+          | otherwise -> rhythmicity0HTup  (helperHF1 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | c1 == '0' = if c2 `elem` ["2f","3f","4f"] then rhythmicityKFHTup (helperHF1 (case c5 of {'2' -> 2; '3' -> 3; '4' -> 4; ~rrrrr -> 1}) syllableDurationsDs) ff k (fromMaybe 1.0 x) (fromMaybe 1.0 y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+         else rhythmicityKHTup (helperHF1 (case c5 of {'2' -> 2; '3' -> 3; '4' -> 4; ~rrrrr -> 1}) syllableDurationsDs) (fromMaybe 1.0 x) (fromMaybe 1.0 y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | L.ordCs2HPred1 [L.O "z", L.C "begvAFIZ"] c1 = rhythmicityH'Tup ff k choice syllableDurationsDs CF0 tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | otherwise = rhythmicityKHTup (let q = readMaybe c4::Maybe Int in+              case q of {Just q' -> helperHF1 q' syllableDurationsDs; ~Nothing -> (\_ -> [[-1.0]]) })+                (fromMaybe 1.0 x) (fromMaybe 1.0 y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+               where w1F f tttts ch rh = (if c1 == 'w' then rhythmicityABC else rhythmicityABC0) 1.0 (fromMaybe 2.0 x) (fromMaybe 0.125 y) ch rh . mconcat . f $ tttts+                     wwF xs =+                       let n1 = readMaybe xs::Maybe Int in+                         case n1 of+                          Just n2 -> w1F (helperHF1 n2 syllableDurationsDs . convFI bbs) +                          Nothing -> w1F (\_ -> [[-1.0]])+                     {-# INLINE w1F #-}+                     {-# INLINE wwF #-}+rhythmicitya'Tup ff k choice@(c1:c2@(c3:cs)) syllableDurationsDs CF0 bbs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt@(FSL tttts)+ | choice == "0y" = rhythmicity0HTup (helperHF1 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | choice == "0f" = rhythmicity0FHTup (helperHF1 1 syllableDurationsDs) ff k tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | otherwise = rhythmicity0HTup (helperHF1 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+rhythmicitya'Tup ff k choice@(c1:c2@(c3:cs)) syllableDurationsDs (CF2 x y) bbs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt@(FSL tttts) + | choice == "0f" = rhythmicityKFHTup (helperHF1 1 syllableDurationsDs) ff k (fromMaybe 1.0 x) (fromMaybe 1.0 y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  tttt+ | choice == "0y" = rhythmicityKHTup (helperHF1 1 syllableDurationsDs) (fromMaybe 1.0 x) (fromMaybe 1.0 y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  tttt+ | otherwise = rhythmicity0HTup (helperHF1 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+rhythmicitya'Tup ff k choice@(c1:c2@(c3:cs)) syllableDurationsDs CF0 bbs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt@(Str tttts@(_:_))+ | choice == "0y" = rhythmicity0HTup  (helperHF1 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | choice == "0f" = rhythmicity0FHTup (helperHF1 1 syllableDurationsDs) ff k tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | otherwise = rhythmicity0HTup (helperHF1 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+rhythmicitya'Tup ff k choice@(c1:c2@(c3:cs)) syllableDurationsDs (CF2 x y) bbs tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt@(Str tttts@(_:_)) + | choice == "0f" = rhythmicityKFHTup (helperHF1 1 syllableDurationsDs) ff k (fromMaybe 1.0 x) (fromMaybe 1.0 y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ | choice == "0y" = rhythmicityKHTup (helperHF1 1 syllableDurationsDs) (fromMaybe 1.0 x) (fromMaybe 1.0 y) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+ |  otherwise = rhythmicity0HTup (helperHF1 1 syllableDurationsDs) tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt+rhythmicitya'Tup _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ = -2.0
− Phonetic/Languages/Array/Ukrainian/PropertiesFuncRepG2.hs
@@ -1,58 +0,0 @@-{-# OPTIONS_HADDOCK show-extensions #-}---- |--- Module      :  Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2--- 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.PropertiesFuncRepG2 (-  -- * Extended functions-  -- ** Functions with 'Int16'-  procDiverse2ITup-  -- ** Functions with 'Double'-  -- *** More general-  , procB2FGTup-  , procB2InvFGTup-  -- *** Usual ones-  , procDiverse2FTup-  , procBothFTup-  , procBothFFTup-  , procBothInvFTup-  , procBothInvFFTup-  -- *** Working with generated by r-glpk-phonetic-languages-ukrainian-durations syllable durations-  , procBoth2FTup-  , procBoth2FFTup-  , procBoth2InvFTup-  , procBoth2InvFFTup-  -- *** NEW Working with generated by r-glpk-phonetic-languages-ukrainian-durations syllable durations-  , procBoth3FTup-  , procBoth3FFTup-  , procBoth3InvFTup-  , procBoth3InvFFTup-  , procBoth4FTup-  , procBoth4FFTup-  , procBoth4InvFTup-  , procBoth4InvFFTup-  -- ** Working with rhythmicity-  , procRhythmicity23FTup-  -- *** Working with rhythmicity that can be defined by the user (using 'rhythmicityH')-  , procRhythmicity23FHTup-) where--import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2Common-import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2Common-import Phonetic.Languages.Array.Ukrainian.Common-import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2Diverse-import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2Rhythmicity-import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG21-import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG22-import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG23-import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG24
− Phonetic/Languages/Array/Ukrainian/PropertiesFuncRepG21.hs
@@ -1,137 +0,0 @@-{-# OPTIONS_HADDOCK show-extensions #-}---- |--- Module      :  Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG21--- 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.--module Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG21 (-  -- * With tuples-  procBothFTup-  , procBothFFTup-  , procBothInvFTup-  , procBothInvFFTup-) where--import Phonetic.Languages.Array.Ukrainian.Common-import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2Common-import Phonetic.Languages.Basis-import qualified Languages.Phonetic.Ukrainian.Syllable.Double.ArrInt8 as SD-import Melodics.Ukrainian.ArrInt8-import GHC.Arr (Array)-import GHC.Int (Int8)-import Phonetic.Languages.Emphasis-import Phonetic.Languages.Coeffs--procBothFTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> (Double -> c)-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procBothFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs sels- = procB2FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g SD.syllableDurationsD coeffs sels-{-# INLINE procBothFTup #-}--procBothFFTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> (Double -> c)-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procBothFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k g coeffs sels- = procB2FFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k g SD.syllableDurationsD coeffs sels-{-# INLINE procBothFFTup #-}--procBothInvFTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> (Double -> c)-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procBothInvFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs sels- = procB2InvFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g SD.syllableDurationsD coeffs sels-{-# INLINE procBothInvFTup #-}--procBothInvFFTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> (Double -> c)-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procBothInvFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k g coeffs sels- = procB2InvFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k g SD.syllableDurationsD coeffs sels-{-# INLINE procBothInvFFTup #-}-
− Phonetic/Languages/Array/Ukrainian/PropertiesFuncRepG22.hs
@@ -1,138 +0,0 @@-{-# OPTIONS_HADDOCK show-extensions #-}---- |--- Module      :  Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG22--- 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.--module Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG22 (-  -- * Functions with 'Double'-  -- ** With tuples-  procBoth2FTup-  , procBoth2FFTup-  , procBoth2InvFTup-  , procBoth2InvFFTup-) where--import Phonetic.Languages.Array.Ukrainian.Common-import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2Common-import Phonetic.Languages.Basis-import qualified Languages.Phonetic.Ukrainian.Syllable.Double.ArrInt8 as SD-import Melodics.Ukrainian.ArrInt8-import GHC.Arr (Array)-import GHC.Int (Int8)-import Phonetic.Languages.Emphasis-import Phonetic.Languages.Coeffs--procBoth2FTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> (Double -> c)-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procBoth2FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs sels- = procB2FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g SD.syllableDurationsD2 coeffs sels-{-# INLINE procBoth2FTup #-}--procBoth2FFTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> (Double -> c)-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procBoth2FFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k g coeffs sels- = procB2FFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k g SD.syllableDurationsD2 coeffs sels-{-# INLINE procBoth2FFTup #-}--procBoth2InvFTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> (Double -> c)-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procBoth2InvFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs sels- = procB2InvFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g SD.syllableDurationsD2 coeffs sels-{-# INLINE procBoth2InvFTup #-}--procBoth2InvFFTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> (Double -> c)-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procBoth2InvFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k g coeffs sels- = procB2InvFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k g SD.syllableDurationsD2 coeffs sels-{-# INLINE procBoth2InvFFTup #-}-
− Phonetic/Languages/Array/Ukrainian/PropertiesFuncRepG23.hs
@@ -1,138 +0,0 @@-{-# OPTIONS_HADDOCK show-extensions #-}---- |--- Module      :  Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG23--- 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.--module Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG23 (-  -- * Functions with 'Double'-  -- ** With tuples-  procBoth3FTup-  , procBoth3FFTup-  , procBoth3InvFTup-  , procBoth3InvFFTup-) where--import Phonetic.Languages.Array.Ukrainian.Common-import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2Common-import Phonetic.Languages.Basis-import qualified Languages.Phonetic.Ukrainian.Syllable.Double.ArrInt8 as SD-import Melodics.Ukrainian.ArrInt8-import GHC.Arr (Array)-import GHC.Int (Int8)-import Phonetic.Languages.Emphasis-import Phonetic.Languages.Coeffs--procBoth3FTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> (Double -> c)-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procBoth3FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs sels- = procB2FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g SD.syllableDurationsD3 coeffs sels-{-# INLINE procBoth3FTup #-}--procBoth3FFTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> (Double -> c)-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procBoth3FFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k g coeffs sels- = procB2FFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k g SD.syllableDurationsD3 coeffs sels-{-# INLINE procBoth3FFTup #-}--procBoth3InvFTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> (Double -> c)-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procBoth3InvFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs sels- = procB2InvFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g SD.syllableDurationsD3 coeffs sels-{-# INLINE procBoth3InvFTup #-}--procBoth3InvFFTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> (Double -> c)-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procBoth3InvFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k g coeffs sels- = procB2InvFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k g SD.syllableDurationsD3 coeffs sels-{-# INLINE procBoth3InvFFTup #-}-
− Phonetic/Languages/Array/Ukrainian/PropertiesFuncRepG24.hs
@@ -1,138 +0,0 @@-{-# OPTIONS_HADDOCK show-extensions #-}---- |--- Module      :  Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG24--- 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.--module Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG24 (-  -- * Functions with 'Double'-  -- ** With tuples-  procBoth4FTup-  , procBoth4FFTup-  , procBoth4InvFTup-  , procBoth4InvFFTup-) where--import Phonetic.Languages.Array.Ukrainian.Common-import Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2Common-import Phonetic.Languages.Basis-import qualified Languages.Phonetic.Ukrainian.Syllable.Double.ArrInt8 as SD-import Melodics.Ukrainian.ArrInt8-import GHC.Arr (Array)-import GHC.Int (Int8)-import Phonetic.Languages.Emphasis-import Phonetic.Languages.Coeffs--procBoth4FTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> (Double -> c)-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procBoth4FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs sels- = procB2FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g SD.syllableDurationsD4 coeffs sels-{-# INLINE procBoth4FTup #-}--procBoth4FFTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> (Double -> c)-  -> Coeffs2-  -> FlowSound -  -> FuncRep2 ReadyForConstructionUkr Double c-procBoth4FFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k g coeffs sels- = procB2FFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k g SD.syllableDurationsD4 coeffs sels-{-# INLINE procBoth4FFTup #-}--procBoth4InvFTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> (Double -> c)-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procBoth4InvFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g coeffs sels- = procB2InvFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 g SD.syllableDurationsD4 coeffs sels-{-# INLINE procBoth4InvFTup #-}--procBoth4InvFFTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> (Double -> c)-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procBoth4InvFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k g coeffs sels- = procB2InvFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k g SD.syllableDurationsD4 coeffs sels-{-# INLINE procBoth4InvFFTup #-}-
− Phonetic/Languages/Array/Ukrainian/PropertiesFuncRepG2Common.hs
@@ -1,219 +0,0 @@-{-# OPTIONS_HADDOCK show-extensions #-}---- |--- Module      :  Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2Common--- 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.PropertiesFuncRepG2Common 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.Array.Ukrainian.Common-import Phonetic.Languages.UniquenessPeriodsG-import Phonetic.Languages.Basis-import GHC.Float (int2Double)-import qualified Languages.Phonetic.Ukrainian.Syllable.ArrInt8 as S-import Melodics.Ukrainian.ArrInt8-import GHC.Arr (Array)-import GHC.Int (Int8)-import Phonetic.Languages.Emphasis-import Phonetic.Languages.Coeffs--#ifdef __GLASGOW_HASKELL__-#if __GLASGOW_HASKELL__==708-/* code that applies only to GHC 7.8.* */-mconcat = concat-#endif-#endif--procB2FGTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> ([Double] -> Double)-  -> (Double -> c)-  -> ([[[Sound8]]] -> [[Double]])-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procB2FGTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 h1 h g coeffs sels- = D (\xs -> case xs of-               Str ts ->-                 let ys = convertToProperUkrainianI8WithTuples  tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 .          map (\x -> if x == '-' then ' ' else x) $ ts in  ((int2Double . fromEnum . diverse2GGL sels [100,101] $ ys)*(h1 . mconcat . g .-                             map (S.divVwls . S.reSyllableCntntsTup tup17 . S.groupSnds) . words1 $ ys))-               FSL xsss -> h1 . mconcat . g $ xsss) h-{-# INLINE procB2FGTup #-}--procB2InvFGTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> ([Double] -> Double)-  -> (Double -> c)-  -> ([[[Sound8]]] -> [[Double]])-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procB2InvFGTup  tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 h1 h g coeffs sels- = D (\xs -> case xs of-               Str ts ->-                 let !ys = convertToProperUkrainianI8WithTuples  tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 .-                             map (\x -> if x == '-' then ' ' else x) $ ts-                     !z = diverse2GGL sels [100,101] ys in if z == 0 then  (h1 . mconcat . g . map (S.divVwls . S.reSyllableCntntsTup tup17 .-                             S.groupSnds) . words1 $ ys) ** 2.0-                                 else  ((h1 . mconcat . g . map (S.divVwls . S.reSyllableCntntsTup tup17 . S.groupSnds) . words1 $ ys) / (int2Double . fromEnum $ z))-               FSL xsss -> h1 . mconcat . g $ xsss) h-{-# INLINE procB2InvFGTup #-}--procB2FTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> (Double -> c)-  -> ([[[Sound8]]] -> [[Double]])-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procB2FTup  tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 h g coeffs sels- = procB2FGTup  tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (eval23Coeffs coeffs) h g coeffs sels-{-# INLINE procB2FTup #-}--procB2FFTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> (Double -> c)-  -> ([[[Sound8]]] -> [[Double]])-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procB2FFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  k h g coeffs sels- = procB2FGTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (eval23CoeffsF k coeffs) h g coeffs sels-{-# INLINE procB2FFTup #-}--procB2InvFTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> (Double -> c)-  -> ([[[Sound8]]] -> [[Double]])-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procB2InvFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 h g coeffs sels- = procB2InvFGTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (eval23Coeffs coeffs) h g coeffs sels-{-# INLINE procB2InvFTup #-}--procB2InvFFTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> (Double -> c)-  -> ([[[Sound8]]] -> [[Double]])-  -> Coeffs2-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procB2InvFFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k h g coeffs sels- = procB2InvFGTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (eval23CoeffsF k coeffs) h g coeffs sels-{-# INLINE procB2InvFFTup #-}-
− Phonetic/Languages/Array/Ukrainian/PropertiesFuncRepG2Diverse.hs
@@ -1,81 +0,0 @@-{-# OPTIONS_HADDOCK show-extensions #-}---- |--- Module      :  Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2Diverse--- 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.--module Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2Diverse (-  -- * Functions with 'Int16'-  procDiverse2ITup-  -- ** Usual ones-  , procDiverse2FTup-) where--import GHC.Int-import GHC.Arr (Array)-import Phonetic.Languages.UniquenessPeriodsG-import Phonetic.Languages.Basis-import GHC.Float (int2Double)-import Melodics.Ukrainian.ArrInt8-import Phonetic.Languages.Emphasis--procDiverse2ITup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> (Int16 -> c)-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Int16 c-procDiverse2ITup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 g sels-  = D (\x -> case x of-               Str xs -> diverse2GGL sels [100,101] .-                  convertToProperUkrainianI8WithTuples tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 $ xs-               FSL xsss -> 1) g-{-# INLINE procDiverse2ITup #-}--procDiverse2FTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> (Double -> c)-  -> FlowSound-  -> FuncRep2 ReadyForConstructionUkr Double c-procDiverse2FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 g sels-  = D (\x -> case x of-               Str xs -> int2Double . fromEnum . diverse2GGL sels [100,101] .-                  convertToProperUkrainianI8WithTuples tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 $ xs-               FSL xsss -> 1.0) g-{-# INLINE procDiverse2FTup #-}
− Phonetic/Languages/Array/Ukrainian/PropertiesFuncRepG2Rhythmicity.hs
@@ -1,94 +0,0 @@-{-# OPTIONS_HADDOCK show-extensions #-}---- |--- Module      :  Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2Rhythmicity--- Copyright   :  (c) OleksandrZhabenko 2020-2021--- 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.--module Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2Rhythmicity (-  -- * Extended-  -- ** Working with rhythmicity-  procRhythmicity23FTup-  -- *** Working with rhythmicity that can be defined by the user (using 'rhythmicityH')-  , procRhythmicity23FHTup-) where---import Phonetic.Languages.Array.Ukrainian.Common hiding (procRhythm23F)-import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2H-import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2Hprime-import qualified Phonetic.Languages.Basis as B-import Melodics.Ukrainian.ArrInt8-import GHC.Arr (Array)-import GHC.Int (Int8)-import Phonetic.Languages.Emphasis-import Phonetic.Languages.Coeffs--procRhythm23F-  :: (Ord c) => (Double -> c)-  -> String-  -> (String -> Coeffs2 -> ReadyForConstructionUkr -> Double)-  -> Coeffs2-  -> B.FuncRep2 ReadyForConstructionUkr Double c-procRhythm23F h choice g coeffs = B.D (g choice coeffs) h-{-# INLINE procRhythm23F #-}--procRhythmicity23FTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> (Double -> c)-  -> String-  -> Coeffs2-  -> B.FuncRep2 ReadyForConstructionUkr Double c-procRhythmicity23FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k g choice coeffs = procRhythm23F g choice (rhythmicityTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k) coeffs-{-# INLINE procRhythmicity23FTup #-}--procRhythmicity23FHTup-  :: (Ord c) => Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> (Double -> c)-  -> [[[[Sound8]]] -> [[Double]]]-  -> String-  -> Coeffs2-  -> String-  -> B.FuncRep2 ReadyForConstructionUkr Double c-procRhythmicity23FHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k g syllableDurationsDs choice coeffs bbs = B.D (rhythmicityHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k choice syllableDurationsDs coeffs bbs) g-{-# INLINE procRhythmicity23FHTup #-}
− Phonetic/Languages/Array/Ukrainian/PropertiesSyllablesG2.hs
@@ -1,58 +0,0 @@-{-# OPTIONS_HADDOCK show-extensions #-}---- |--- Module      :  Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2--- Copyright   :  (c) OleksandrZhabenko 2020-2022--- License     :  MIT--- Stability   :  Experimental--- Maintainer  :  olexandr543@yahoo.com------ Generalization and extension of the functionality of the DobutokO.Poetry.Norms--- and DobutokO.Poetry.Norms.Extended modules--- from the @dobutokO-poetry@ package. Uses syllables information.--- Instead of the vector-related, uses just arrays.--module Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2 (-  -- * Rhythmicity properties extended-  -- ** Rhythmicity properties (semi-empirical)-  -- *** General ones-  rhythmicity0HTup-  , rhythmicity0FHTup-  , rhythmicityKHTup-  , rhythmicityKFHTup-  -- *** Simple one-  , rhythmicity0Tup-  , rhythmicity0FTup-  -- *** With weight coefficients-  , rhythmicityKTup-  , rhythmicityKFTup-  -- ** Rhythmicity properties from generated with r-glpk-phonetic-languages-ukrainian-durations package (since 0.2.0.0 version)-  -- *** Simple one-  , rhythmicity02Tup-  , rhythmicity02FTup-  -- *** With weight coefficients-  , rhythmicityK2Tup-  , rhythmicityKF2Tup-  -- ** NEW Rhythmicity properties from generated with r-glpk-phonetic-languages-ukrainian-durations package-  -- *** Simple ones-  , rhythmicity03Tup-  , rhythmicity03FTup-  , rhythmicity04Tup-  , rhythmicity04FTup-  -- *** With weight coefficients-  , rhythmicityK3Tup-  , rhythmicityKF3Tup-  , rhythmicityK4Tup-  , rhythmicityKF4Tup-  -- ** General-  , rhythmicityGTup-  , rhythmicityGHTup-  , rhythmicityTup-  , rhythmicityHTup-  , rhythmicityH'Tup-) where--import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2Common-import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG201-import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2H-import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2Hprime
− Phonetic/Languages/Array/Ukrainian/PropertiesSyllablesG201.hs
@@ -1,607 +0,0 @@-{-# OPTIONS_HADDOCK show-extensions #-}---- |--- Module      :  Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG201--- Copyright   :  (c) OleksandrZhabenko 2020-2022--- License     :  MIT--- Stability   :  Experimental--- Maintainer  :  olexandr543@yahoo.com------ Generalization and extension of the functionality of the DobutokO.Poetry.Norms--- and DobutokO.Poetry.Norms.Extended modules--- from the @dobutokO-poetry@ package. Uses syllables information.--- Instead of the vector-related, uses just arrays.--{-# LANGUAGE CPP, BangPatterns, MultiWayIf #-}--module Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG201 (-  -- * Extended rhythmicity properties-  -- ** Rhythmicity properties (semi-empirical)-  -- *** General ones-  rhythmicity0HTup-  , rhythmicity0FHTup-  , rhythmicityKHTup-  , rhythmicityKFHTup-  -- *** Simple one-  , rhythmicity0Tup-  , rhythmicity0FTup-  -- *** With weight coefficients-  , rhythmicityKTup-  , rhythmicityKFTup-  -- ** Rhythmicity properties from generated with r-glpk-phonetic-languages-ukrainian-durations package (since 0.2.0.0 version)-  -- *** Simple one-  , rhythmicity02Tup-  , rhythmicity02FTup-  -- *** With weight coefficients-  , rhythmicityK2Tup-  , rhythmicityKF2Tup-  -- ** NEW Rhythmicity properties from generated with r-glpk-phonetic-languages-ukrainian-durations package-  -- *** Simple ones-  , rhythmicity03Tup-  , rhythmicity03FTup-  , rhythmicity04Tup-  , rhythmicity04FTup-  -- *** With weight coefficients-  , rhythmicityK3Tup-  , rhythmicityKF3Tup-  , rhythmicityK4Tup-  , rhythmicityKF4Tup-  -- ** General-  , rhythmicityGTup-) 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.Array.Ukrainian.Common-import Languages.Phonetic.Ukrainian.Syllable.Double.ArrInt8-import Melodics.Ukrainian.ArrInt8 (Sound8,FlowSound)-import Languages.Phonetic.Ukrainian.Syllable.ArrInt8-import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2Common-import GHC.Arr (Array)-import GHC.Int (Int8)-import Phonetic.Languages.Emphasis--#ifdef __GLASGOW_HASKELL__-#if __GLASGOW_HASKELL__==708-/* code that applies only to GHC 7.8.* */-mconcat = concat-#endif-#endif--rhythmicityGTup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> ([[[Sound8]]] -> [[Double]])-- ^ A function that specifies the syllables durations, analogue of (or one of) the-  -- syllableDurationsD functions from the @ukrainian-phonetics-basics-array@ package.-  -> ReadyForConstructionUkr-  -> [Double]-rhythmicityGTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 f (Str xs@(_:_)) = mconcat . f . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 $ xs-rhythmicityGTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 f (FSL xsss@(_:_)) = mconcat . f $ xsss-rhythmicityGTup _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ = []-{-# INLINE rhythmicityGTup #-}---------------------------------------------------------rhythmicity0HTup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> ([[[Sound8]]]-  -> [[Double]])-  -> ReadyForConstructionUkr-  -> Double-rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 f = rhythmicityGHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 f eval23-{-# INLINE rhythmicity0HTup #-}--rhythmicity0Tup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> ReadyForConstructionUkr-  -> Double-rhythmicity0Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 = rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsD-{-# INLINE rhythmicity0Tup #-}--rhythmicity02Tup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> ReadyForConstructionUkr-  -> Double-rhythmicity02Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 = rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsD2-{-# INLINE rhythmicity02Tup #-}--rhythmicity03Tup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> ReadyForConstructionUkr-  -> Double-rhythmicity03Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 = rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsD3-{-# INLINE rhythmicity03Tup #-}--rhythmicity04Tup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> ReadyForConstructionUkr-  -> Double-rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 = rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsD4-{-# INLINE rhythmicity04Tup #-}-----------------------------------------------------------rhythmicityKHTup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> ([[[Sound8]]]-  -> [[Double]])-  -> Double-  -> Double-  -> ReadyForConstructionUkr-  -> Double-rhythmicityKHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 f k2 k3 = rhythmicityGHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 f (eval23K k2 k3)-{-# INLINE rhythmicityKHTup #-}--rhythmicityKTup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> Double-  -> ReadyForConstructionUkr-  -> Double-rhythmicityKTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k2 k3 = rhythmicityKHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsD k2 k3-{-# INLINE rhythmicityKTup #-}--rhythmicityK2Tup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> Double-  -> ReadyForConstructionUkr-  -> Double-rhythmicityK2Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k2 k3 = rhythmicityKHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsD2 k2 k3-{-# INLINE rhythmicityK2Tup #-}--rhythmicityK3Tup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> Double-  -> ReadyForConstructionUkr-  -> Double-rhythmicityK3Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k2 k3 = rhythmicityKHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsD3 k2 k3-{-# INLINE rhythmicityK3Tup #-}--rhythmicityK4Tup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> Double-  -> ReadyForConstructionUkr-  -> Double-rhythmicityK4Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k2 k3 = rhythmicityKHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsD4 k2 k3-{-# INLINE rhythmicityK4Tup #-}------------------------------------------------------------rhythmicity0FHTup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> ([[[Sound8]]]-  -> [[Double]])-  -> Double-  -> ReadyForConstructionUkr-  -> Double-rhythmicity0FHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 f k = rhythmicityGHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 f (eval23F k)-{-# INLINE rhythmicity0FHTup #-}--rhythmicity0FTup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> ReadyForConstructionUkr-  -> Double-rhythmicity0FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k = rhythmicity0FHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsD k-{-# INLINE rhythmicity0FTup #-}--rhythmicity02FTup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> ReadyForConstructionUkr-  -> Double-rhythmicity02FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k = rhythmicity0FHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsD2 k-{-# INLINE rhythmicity02FTup #-}--rhythmicity03FTup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> ReadyForConstructionUkr-  -> Double-rhythmicity03FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k = rhythmicity0FHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsD3 k-{-# INLINE rhythmicity03FTup #-}--rhythmicity04FTup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> ReadyForConstructionUkr-  -> Double-rhythmicity04FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k = rhythmicity0FHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsD4 k-{-# INLINE rhythmicity04FTup #-}------------------------------------------------------------rhythmicityKFHTup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> ([[[Sound8]]]-  -> [[Double]])-  -> Double-  -> Double-  -> Double-  -> ReadyForConstructionUkr-  -> Double-rhythmicityKFHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 f k k2 k3 = rhythmicityGHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 f (eval23KF k k2 k3)-{-# INLINE rhythmicityKFHTup #-}--rhythmicityKFTup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> Double-  -> Double-  -> ReadyForConstructionUkr-  -> Double-rhythmicityKFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k k2 k3 = rhythmicityKFHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsD k k2 k3-{-# INLINE rhythmicityKFTup #-}--rhythmicityKF2Tup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> Double-  -> Double-  -> ReadyForConstructionUkr-  -> Double-rhythmicityKF2Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k k2 k3 = rhythmicityKFHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsD2 k k2 k3-{-# INLINE rhythmicityKF2Tup #-}--rhythmicityKF3Tup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> Double-  -> Double-  -> ReadyForConstructionUkr-  -> Double-rhythmicityKF3Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k k2 k3 = rhythmicityKFHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsD3 k k2 k3-{-# INLINE rhythmicityKF3Tup #-}--rhythmicityKF4Tup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> Double-  -> Double-  -> ReadyForConstructionUkr-  -> Double-rhythmicityKF4Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k k2 k3 = rhythmicityKFHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 syllableDurationsD4 k k2 k3-{-# INLINE rhythmicityKF4Tup #-}
− Phonetic/Languages/Array/Ukrainian/PropertiesSyllablesG2Common.hs
@@ -1,65 +0,0 @@-{-# OPTIONS_HADDOCK show-extensions #-}---- |--- Module      :  Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2Common--- Copyright   :  (c) OleksandrZhabenko 2020-2022--- License     :  MIT--- Stability   :  Experimental--- Maintainer  :  olexandr543@yahoo.com------ Generalization and extension of the functionality of the DobutokO.Poetry.Norms--- and DobutokO.Poetry.Norms.Extended modules--- from the @dobutokO-poetry@ package. Uses syllables information.--- Instead of the vector-related, uses just arrays.--{-# LANGUAGE CPP, BangPatterns #-}--module Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2Common 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 Melodics.Ukrainian.ArrInt8 (Sound8,FlowSound)-import Languages.Phonetic.Ukrainian.Syllable.ArrInt8-import GHC.Arr-import GHC.Int-import Phonetic.Languages.Emphasis--#ifdef __GLASGOW_HASKELL__-#if __GLASGOW_HASKELL__==708-/* code that applies only to GHC 7.8.* */-mconcat = concat-#endif-#endif--rhythmicityGHTup- :: Array Int (Int8, Bool)- -> Array Int (Int8, Bool)- -> Array Int (Int8, Bool)- -> Array Int (Int8, Bool)- -> Array Int ([Int8], Bool)- -> Array Int ([Int8], Int8)- -> Array Int (Int8, FlowSound -> Sound8)- -> Array Int (Int8, Bool)- -> Array Int ([Int8], Bool)- -> Array Int ([Int8], Bool)- -> Array Int ([Int8], Bool)- -> Array Int (Int8, [Int8])- -> Array Int (Char,Int8)- -> Array Int (Int8,[Int8])- -> Array Int (Char, Bool)- -> Array Int (Char, Bool)- -> Array Int (Int8,Bool)- -> ([[[Sound8]]] -> [[Double]])- -> ([[Double]] -> Double)- -> ReadyForConstructionUkr- -> Double-rhythmicityGHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 f g (Str xs@(_:_))- = g . f . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 $ xs-rhythmicityGHTup _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ f g (FSL xsss@(_:_)) = g . f $ xsss -rhythmicityGHTup _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ = 0.0-{-# INLINE rhythmicityGHTup #-}
− Phonetic/Languages/Array/Ukrainian/PropertiesSyllablesG2H.hs
@@ -1,243 +0,0 @@-{-# OPTIONS_HADDOCK show-extensions #-}---- |--- Module      :  Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2H--- Copyright   :  (c) OleksandrZhabenko 2020-2022--- License     :  MIT--- Stability   :  Experimental--- Maintainer  :  olexandr543@yahoo.com------ Generalization and extension of the functionality of the DobutokO.Poetry.Norms--- and DobutokO.Poetry.Norms.Extended modules--- from the @dobutokO-poetry@ package. Uses syllables information.--- Instead of the vector-related, uses just arrays.--{-# LANGUAGE CPP, BangPatterns, MultiWayIf #-}--module Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2H (-  -- * General-  parseChRhEndMaybe-  -- * Extended general-  , rhythmicityTup-) 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.Array.Ukrainian.Common-import Languages.Phonetic.Ukrainian.Syllable.Double.ArrInt8-import Melodics.Ukrainian.ArrInt8 (Sound8,FlowSound)-import Languages.Phonetic.Ukrainian.Syllable.ArrInt8-import Data.Maybe (fromMaybe)-import Text.Read (readMaybe)-import Rhythmicity.TwoFourth-import Rhythmicity.PolyRhythm-import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG201-import GHC.Arr (Array)-import GHC.Int (Int8)-import Phonetic.Languages.Emphasis-import Phonetic.Languages.Coeffs--#ifdef __GLASGOW_HASKELL__-#if __GLASGOW_HASKELL__==708-/* code that applies only to GHC 7.8.* */-mconcat = concat-#endif-#endif--helperF4 :: Int -> [[[Sound8]]] -> [[Double]]-helperF4 n- | n == 1 = syllableDurationsD- | n == 2 = syllableDurationsD2- | n == 3 = syllableDurationsD3- | otherwise = syllableDurationsD4--------------------------------------------------------------------rhythmicityTup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> String-  -> Coeffs2-  -> ReadyForConstructionUkr-  -> Double-rhythmicityTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k choice CF0 tttt@(Str tttts)= if- | take 1 choice `elem` ["c","M","N"] || (take 1 choice >= "A" && take 1 choice <= "F") -> let just_probe = readRhythmicity choice in-           case just_probe of-             Just (P1 ch rh n) -> rhythmicityABC 1.0 2.0 0.125 ch rh . mconcat . -- the latter one is to be interchanged with weights2SyllableDurationsD-               (helperF4 n) . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 $ tttts-             Just (P2 ch rh r n) -> (case take 1 choice of-                   "A" -> rhythmicityPolyWeightedLEF2 1.0 r ch rh-                   "D" -> rhythmicityPolyWeightedLF2 1.0 r ch rh-                   "E" -> rhythmicityPolyWeightedLEF3 1.0 r ch rh-                   "F" -> rhythmicityPolyWeightedLF3 1.0 r ch rh-                   "B" -> rhythmicityPolyWeightedEF2 1.0 r ch rh-                   "C" -> rhythmicityPolyWeightedF2 1.0 r ch rh-                   "M" -> rhythmicityPolyWeightedEF3 1.0 r ch rh-                   "N" -> rhythmicityPolyWeightedF3 1.0 r ch rh-                   "c" -> rhythmicityPoly 1.0 r ch rh) . mconcat . (helperF4 n) . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 $ tttts-             _ -> rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt- | choice == "0y" -> rhythmicity0Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt- | choice == "02y" -> rhythmicity02Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt- | choice == "03y" -> rhythmicity03Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt- | choice == "0z" -> rhythmicity0FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k tttt- | choice == "02z" -> rhythmicity02FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  k tttt- | choice == "03z" -> rhythmicity03FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k tttt- | choice == "04z" -> rhythmicity04FTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k tttt- | take 1 choice == "0" -> rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt- | take 1 choice == "w" -> if-          | (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "4" ->-             case take 2 choice of-              "w0" -> wwF (drop 2 . take 3 $ choice) (Ch 1 1 4) (Rhythm 1 1 2) tttts-              "w1" -> wwF (drop 2 . take 3 $ choice) (Ch 1 0 4) (Rhythm 2 1 1) tttts-              "w2" -> wwF (drop 2 . take 3 $ choice) (Ch 0 1 4) (Rhythm 1 2 1) tttts-              "w3" -> wwF (drop 2 . take 3 $ choice) (Ch 0 0 4) (Rhythm 1 1 2) tttts-              _ -> rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt-          | otherwise -> rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt- | take 1 choice == "x" -> if-          | (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "4" ->-             case take 2 choice of-              "x0" -> xxF (drop 2 . take 3 $ choice) (Ch 1 1 4) (Rhythm 1 1 2) tttts-              "x1" -> xxF (drop 2 . take 3 $ choice) (Ch 1 0 4) (Rhythm 2 1 1) tttts-              "x2" -> xxF (drop 2 . take 3 $ choice) (Ch 0 1 4) (Rhythm 1 2 1) tttts-              "x3" -> xxF (drop 2 . take 3 $ choice) (Ch 0 0 4) (Rhythm 1 1 2) tttts-              _ -> rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt-          | otherwise -> rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt- | otherwise -> if-    | (take 1 choice == "b" || ((take 1 choice >= "d" && take 1 choice <= "v") || (take 1 choice >= "I" && take 1 choice <= "Z"))) && (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "4" ->-        (case take 1 choice of-          "b" -> g rhythmicityPolyWeightedLEF3 5 1-          "d" -> g rhythmicityPolyWeightedLEF30 5 1-          "e" -> g rhythmicityPolyWeightedLEF3 6 2-          "f" -> g rhythmicityPolyWeightedLEF30 6 2-          "g" -> g rhythmicityPolyWeightedLEF2 5 1-          "h" -> g rhythmicityPolyWeightedLEF20 5 1-          "i" -> g rhythmicityPolyWeightedLEF2 6 2-          "j" -> g rhythmicityPolyWeightedLEF20 6 2-          "k" -> g rhythmicityPolyWeightedLF3 5 1-          "l" -> g rhythmicityPolyWeightedLF30 5 1-          "m" -> g rhythmicityPolyWeightedLF3 6 2-          "n" -> g rhythmicityPolyWeightedLF30 6 2-          "o" -> g rhythmicityPolyWeightedLF2 5 1-          "p" -> g rhythmicityPolyWeightedLF20 5 1-          "q" -> g rhythmicityPolyWeightedLF2 6 2-          "r" -> g rhythmicityPolyWeightedLF20 6 2-          "I" -> g rhythmicityPolyWeightedEF3 5 1-          "J" -> g rhythmicityPolyWeightedEF30 5 1-          "K" -> g rhythmicityPolyWeightedEF3 6 2-          "L" -> g rhythmicityPolyWeightedEF30 6 2-          "O" -> g rhythmicityPolyWeightedEF2 5 1-          "P" -> g rhythmicityPolyWeightedEF20 5 1-          "Q" -> g rhythmicityPolyWeightedEF2 6 2-          "R" -> g rhythmicityPolyWeightedEF20 6 2-          "W" -> g rhythmicityPolyWeightedF3 5 1-          "X" -> g rhythmicityPolyWeightedF30 5 1-          "Y" -> g rhythmicityPolyWeightedF3 6 2-          "Z" -> g rhythmicityPolyWeightedF30 6 2-          "U" -> g rhythmicityPolyWeightedF2 5 1-          "V" -> g rhythmicityPolyWeightedF20 5 1-          "S" -> g rhythmicityPolyWeightedF2 6 2-          "T" -> g rhythmicityPolyWeightedF20 6 2-          "u" -> g rhythmicityPoly 5 1-          "v" -> g rhythmicityPoly0 5 1-          "s" -> g rhythmicityPoly 6 2-          "t" -> g rhythmicityPoly0 6 2) tttts-    | otherwise -> rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt-        where h1 f ts xs m n = f 1.0 4 (PolyCh xs m) (PolyRhythm [1,2,1,n]) . mconcat . (case readMaybe ts::Maybe Int of { Just 1 -> syllableDurationsD ; Just 2 -> syllableDurationsD2 ; Just 3 -> syllableDurationsD3 ; Just 4 -> syllableDurationsD4 }) . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-              h2 f ts xs m n = f 1.0 4 (PolyCh xs m) (PolyRhythm [2,1,1,n]) . mconcat . (case readMaybe ts::Maybe Int of { Just 1 -> syllableDurationsD ; Just 2 -> syllableDurationsD2 ; Just 3 -> syllableDurationsD3 ; Just 4 -> syllableDurationsD4 }) . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-              g f m n-                | drop 1 choice `elem` ["01","02","03","04"] = h1 f (drop 2 . take 3 $ choice) [True,True,True] m n-                | drop 1 choice `elem` ["11","12","13","14"] = h1 f (drop 2 . take 3 $ choice) [True,True,False] m n-                | drop 1 choice `elem` ["21","22","23","24"] = h1 f (drop 2 . take 3 $ choice) [True,False,True] m n-                | drop 1 choice `elem` ["31","32","33","34"] = h1 f (drop 2 . take 3 $ choice) [True,False,False] m n-                | drop 1 choice `elem` ["41","42","43","44"] = h2 f (drop 2 . take 3 $ choice) [True,True,True] m n-                | drop 1 choice `elem` ["51","52","53","54"] = h2 f (drop 2 . take 3 $ choice) [True,True,False] m n-                | drop 1 choice `elem` ["61","62","63","64"] = h2 f (drop 2 . take 3 $ choice) [True,False,True] m n-                | drop 1 choice `elem` ["71","72","73","74"] = h2 f (drop 2 . take 3 $ choice) [True,False,False] m n-                | otherwise = \_ -> rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt-              w1F f ch rh = rhythmicityABC 1.0 2.0 0.125 ch rh . mconcat . f . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-              wwF2 g2 xs = let (Just n) = readMaybe xs::Maybe Int in-                      case n `rem` 4 of-                       1 -> g2 syllableDurationsD-                       2 -> g2 syllableDurationsD2-                       3 -> g2 syllableDurationsD3-                       _ -> g2 syllableDurationsD4-              x1F f ch rh = rhythmicityABC0 1.0 2.0 0.125 ch rh . mconcat . f . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-              xxF = wwF2 x1F-              wwF = wwF2 w1F-              {-# INLINE w1F #-}-              {-# INLINE wwF2 #-}-              {-# INLINE x1F #-}-              {-# INLINE xxF #-}-              {-# INLINE wwF #-}-rhythmicityTup  tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k choice (CF2 x y) tttt@(Str tttts) =- case take 1 choice of-  "0" -> (case choice of-           "0y" -> rhythmicityKTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (fromMaybe 1.0 x) (fromMaybe 1.0 y)-           "02y" -> rhythmicityK2Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (fromMaybe 1.0 x) (fromMaybe 1.0 y)-           "03y" -> rhythmicityK3Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (fromMaybe 1.0 x) (fromMaybe 1.0 y)-           "0z" -> rhythmicityKFTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k (fromMaybe 1.0 x) (fromMaybe 1.0 y)-           "02z" -> rhythmicityKF2Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k (fromMaybe 1.0 x) (fromMaybe 1.0 y)-           "03z" -> rhythmicityKF3Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k (fromMaybe 1.0 x) (fromMaybe 1.0 y)-           "04z" -> rhythmicityKF4Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k (fromMaybe 1.0 x) (fromMaybe 1.0 y)-           _ -> rhythmicityK4Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (fromMaybe 1.0 x) (fromMaybe 1.0 y)) tttt-  "w" -> if-          | (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "4" ->-             case take 2 choice of-              "w0" -> wwF (drop 2 . take 3 $ choice) (Ch 1 1 4) (Rhythm 1 1 2) tttts-              "w1" -> wwF (drop 2 . take 3 $ choice) (Ch 1 0 4) (Rhythm 2 1 1) tttts-              "w2" -> wwF (drop 2 . take 3 $ choice) (Ch 0 1 4) (Rhythm 1 2 1) tttts-              "w3" -> wwF (drop 2 . take 3 $ choice) (Ch 0 0 4) (Rhythm 1 1 2) tttts-              _ -> rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt-          | otherwise -> rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt-              where w1F f ch rh = rhythmicityABC 1.0 (fromMaybe 2.0 x) (fromMaybe 0.125 y) ch rh . mconcat . f . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-                    wwF xs = let (Just n) = readMaybe xs::Maybe Int in-                      case n `rem` 4 of-                       1 -> w1F syllableDurationsD-                       2 -> w1F syllableDurationsD2-                       3 -> w1F syllableDurationsD3-                       _ -> w1F syllableDurationsD4-                    {-# INLINE w1F #-}-                    {-# INLINE wwF #-}-  "x" -> if-          | (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "4" ->-             case take 2 choice of-              "x0" -> xxF (drop 2 . take 3 $ choice) (Ch 1 1 4) (Rhythm 1 1 2) tttts-              "x1" -> xxF (drop 2 . take 3 $ choice) (Ch 1 0 4) (Rhythm 2 1 1) tttts-              "x2" -> xxF (drop 2 . take 3 $ choice) (Ch 0 1 4) (Rhythm 1 2 1) tttts-              "x3" -> xxF (drop 2 . take 3 $ choice) (Ch 0 0 4) (Rhythm 1 1 2) tttts-              _ -> rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt-          | otherwise -> rhythmicity04Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 tttt-              where x1F f ch rh = rhythmicityABC0 1.0 (fromMaybe 2.0 x) (fromMaybe 0.125 y) ch rh . mconcat . f . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-                    xxF xs = let (Just n) = readMaybe xs::Maybe Int in-                      case n `rem` 4 of-                       1 -> x1F syllableDurationsD-                       2 -> x1F syllableDurationsD2-                       3 -> x1F syllableDurationsD3-                       _ -> x1F syllableDurationsD4-                    {-# INLINE x1F #-}-                    {-# INLINE xxF #-}-  _ -> if-     | ((take 1 choice >= "b" && take 1 choice <= "v") || (take 1 choice >= "A" && take 1 choice <= "Z" && take 1 choice `notElem` ["G","H"])) -> rhythmicityTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  k choice CF0 tttt-     | otherwise -> rhythmicityK4Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (fromMaybe 1.0 x) (fromMaybe 1.0 y) tttt-rhythmicityTup  tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k choice _ _ = -1.0
− Phonetic/Languages/Array/Ukrainian/PropertiesSyllablesG2Hprime.hs
@@ -1,654 +0,0 @@-{-# OPTIONS_HADDOCK show-extensions #-}---- |--- Module      :  Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2Hprime--- Copyright   :  (c) OleksandrZhabenko 2020-2022--- License     :  MIT--- Stability   :  Experimental--- Maintainer  :  olexandr543@yahoo.com------ Generalization and extension of the functionality of the DobutokO.Poetry.Norms--- and DobutokO.Poetry.Norms.Extended modules--- from the @dobutokO-poetry@ package. Uses syllables information.--- Instead of the vector-related, uses just arrays.--{-# LANGUAGE CPP, BangPatterns, MultiWayIf #-}--module Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2Hprime (-  -- * Extended-  rhythmicityHTup-  , rhythmicityH'Tup-  , rhythmicitya'Tup-) 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.Array.Ukrainian.Common-import Languages.Phonetic.Ukrainian.Syllable.Double.ArrInt8-import Melodics.Ukrainian.ArrInt8 (Sound8, FlowSound)-import Languages.Phonetic.Ukrainian.Syllable.ArrInt8-import Data.Maybe (fromMaybe)-import Text.Read (readMaybe)-import Rhythmicity.TwoFourth-import Rhythmicity.PolyRhythm-import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG201-import Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2H-import GHC.Arr (Array)-import GHC.Int (Int8)-import Phonetic.Languages.Emphasis-import Phonetic.Languages.Coeffs--#ifdef __GLASGOW_HASKELL__-#if __GLASGOW_HASKELL__==708-/* code that applies only to GHC 7.8.* */-mconcat = concat-#endif-#endif--helperHF4 :: Int -> [[[[Sound8]]] -> [[Double]]] -> [[[Sound8]]] -> [[Double]]-helperHF4 n xs-  | null xs = syllableDurationsD4-  | (n `rem` length xs) == 0 = head xs-  | otherwise = xs !! ((n `rem` length xs) - 1)--helperHF1 :: Int -> [[[[Sound8]]] -> [[Double]]] -> [[[Sound8]]] -> [[Double]]-helperHF1 n xs-  | null xs = \_ -> []-  | (n `rem` length xs) == 0 = head xs-  | otherwise = xs !! ((n `rem` length xs) - 1)  ---------------------------------------------------------------{-|--}-rhythmicityHTup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> String-  -> [[[[Sound8]]] -> [[Double]]]-  -> Coeffs2-  -> String-  -> ReadyForConstructionUkr-  -> Double-rhythmicityHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k choice syllableDurationsDs coeffs bbs-  | any (== 'a') choice = rhythmicitya'Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k (filter (\c -> c /='a' && c /=  'H') choice) syllableDurationsDs coeffs bbs-  | take 1 choice == "H" = rhythmicityH'Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k (drop 1 choice) syllableDurationsDs coeffs-  | otherwise = rhythmicityTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k choice coeffs--rhythmicityH'Tup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> String-  -> [[[[Sound8]]] -> [[Double]]]-  -> Coeffs2-  -> ReadyForConstructionUkr-  -> Double-rhythmicityH'Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k choice syllableDurationsDs CF0 tttt@(Str tttts) = if- | take 1 choice `elem` ["c","M","N"] || (take 1 choice >= "A" && take 1 choice <= "F") -> let just_probe = readRhythmicity choice in-           (case just_probe of-             Just (P1 ch rh n) -> rhythmicityABC 1.0 2.0 0.125 ch rh . rhythmicityGTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (helperHF4 n syllableDurationsDs)-             Just (P2 ch rh r n) -> (case take 1 choice of-                   "A" -> rhythmicityPolyWeightedLEF2 1.0 r ch rh-                   "D" -> rhythmicityPolyWeightedLF2 1.0 r ch rh-                   "E" -> rhythmicityPolyWeightedLEF3 1.0 r ch rh-                   "F" -> rhythmicityPolyWeightedLF3 1.0 r ch rh-                   "B" -> rhythmicityPolyWeightedEF2 1.0 r ch rh-                   "C" -> rhythmicityPolyWeightedF2 1.0 r ch rh-                   "M" -> rhythmicityPolyWeightedEF3 1.0 r ch rh-                   "N" -> rhythmicityPolyWeightedF3 1.0 r ch rh-                   "c" -> rhythmicityPoly 1.0 r ch rh) . rhythmicityGTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF4 n syllableDurationsDs)-             _ -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF4 1 syllableDurationsDs)) tttt- | choice == "0y" -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF4 1 syllableDurationsDs) tttt- | take 1 choice == "0" && drop 2 (take 3 choice) == "y" ->-    let n2 = readMaybe (drop 1 . take 2 $ choice)::Maybe Int in-      rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-        (helperHF4 (case n2 of { Just n3 -> n3; Nothing -> 1}) syllableDurationsDs) tttt- | choice == "0z" -> rhythmicity0FHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF4 1 syllableDurationsDs) k tttt- | take 1 choice == "0" && drop 2 (take 3 choice) == "z" ->-    let n2 = readMaybe (drop 1 . take 2 $ choice)::Maybe Int in-      rhythmicity0FHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-          (helperHF4 (case n2 of { Just n3 -> n3; Nothing -> 1}) syllableDurationsDs) k tttt- | take 1 choice == "0" -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF4 1 syllableDurationsDs) tttt- | take 1 choice == "w" -> if-          | (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "4" ->-             case take 2 choice of-              "w0" -> wwF (drop 2 . take 3 $ choice) (Ch 1 1 4) (Rhythm 1 1 2) tttts-              "w1" -> wwF (drop 2 . take 3 $ choice) (Ch 1 0 4) (Rhythm 2 1 1) tttts-              "w2" -> wwF (drop 2 . take 3 $ choice) (Ch 0 1 4) (Rhythm 1 2 1) tttts-              "w3" -> wwF (drop 2 . take 3 $ choice) (Ch 0 0 4) (Rhythm 1 1 2) tttts-              _ -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF4 1 syllableDurationsDs) tttt-          | otherwise -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF4 1 syllableDurationsDs) tttt- | take 1 choice == "x" -> if-          | (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "4" ->-             case take 2 choice of-              "x0" -> xxF (drop 2 . take 3 $ choice) (Ch 1 1 4) (Rhythm 1 1 2) tttts-              "x1" -> xxF (drop 2 . take 3 $ choice) (Ch 1 0 4) (Rhythm 2 1 1) tttts-              "x2" -> xxF (drop 2 . take 3 $ choice) (Ch 0 1 4) (Rhythm 1 2 1) tttts-              "x3" -> xxF (drop 2 . take 3 $ choice) (Ch 0 0 4) (Rhythm 1 1 2) tttts-              _ -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF4 1 syllableDurationsDs) tttt-          | otherwise -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF4 1 syllableDurationsDs) tttt- | otherwise -> if-    | (take 1 choice == "b" || ((take 1 choice >= "d" && take 1 choice <= "v") || (take 1 choice >= "I" && take 1 choice <= "Z"))) && (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "9" ->-        (case take 1 choice of-          "b" -> g rhythmicityPolyWeightedLEF3 5 1-          "d" -> g rhythmicityPolyWeightedLEF30 5 1-          "e" -> g rhythmicityPolyWeightedLEF3 6 2-          "f" -> g rhythmicityPolyWeightedLEF30 6 2-          "g" -> g rhythmicityPolyWeightedLEF2 5 1-          "h" -> g rhythmicityPolyWeightedLEF20 5 1-          "i" -> g rhythmicityPolyWeightedLEF2 6 2-          "j" -> g rhythmicityPolyWeightedLEF20 6 2-          "k" -> g rhythmicityPolyWeightedLF3 5 1-          "l" -> g rhythmicityPolyWeightedLF30 5 1-          "m" -> g rhythmicityPolyWeightedLF3 6 2-          "n" -> g rhythmicityPolyWeightedLF30 6 2-          "o" -> g rhythmicityPolyWeightedLF2 5 1-          "p" -> g rhythmicityPolyWeightedLF20 5 1-          "q" -> g rhythmicityPolyWeightedLF2 6 2-          "r" -> g rhythmicityPolyWeightedLF20 6 2-          "I" -> g rhythmicityPolyWeightedEF3 5 1-          "J" -> g rhythmicityPolyWeightedEF30 5 1-          "K" -> g rhythmicityPolyWeightedEF3 6 2-          "L" -> g rhythmicityPolyWeightedEF30 6 2-          "O" -> g rhythmicityPolyWeightedEF2 5 1-          "P" -> g rhythmicityPolyWeightedEF20 5 1-          "Q" -> g rhythmicityPolyWeightedEF2 6 2-          "R" -> g rhythmicityPolyWeightedEF20 6 2-          "W" -> g rhythmicityPolyWeightedF3 5 1-          "X" -> g rhythmicityPolyWeightedF30 5 1-          "Y" -> g rhythmicityPolyWeightedF3 6 2-          "Z" -> g rhythmicityPolyWeightedF30 6 2-          "U" -> g rhythmicityPolyWeightedF2 5 1-          "V" -> g rhythmicityPolyWeightedF20 5 1-          "S" -> g rhythmicityPolyWeightedF2 6 2-          "T" -> g rhythmicityPolyWeightedF20 6 2-          "u" -> g rhythmicityPoly 5 1-          "v" -> g rhythmicityPoly0 5 1-          "s" -> g rhythmicityPoly 6 2-          "t" -> g rhythmicityPoly0 6 2) tttts-    | otherwise -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-       (let ts = drop 2 . take 3 $ choice in-          case ts of { [] -> syllableDurationsD4 ; ks ->-            let q = readMaybe ks::Maybe Int in-              case q of {Just q' -> helperHF4 q' syllableDurationsDs; ~Nothing -> syllableDurationsD4 }}) tttt-        where h1 f ts xs m n = f 1.0 4 (PolyCh xs m) (PolyRhythm [1,2,1,n]) . mconcat .-                  (case ts of { [] -> syllableDurationsD4 ; ks -> let q = readMaybe ks::Maybe Int in-                      case q of {Just q' -> helperHF4 q' syllableDurationsDs; ~Nothing -> syllableDurationsD4 }}) .-                        createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-              h2 f ts xs m n = f 1.0 4 (PolyCh xs m) (PolyRhythm [2,1,1,n]) . mconcat .-                  (case ts of { [] -> syllableDurationsD4 ; ks -> let q = readMaybe ks::Maybe Int in-                      case q of {Just q' -> helperHF4 q' syllableDurationsDs; ~Nothing -> syllableDurationsD4 }}) .-                        createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-              g f m n-                | drop 1 (take 2 choice) == "0" = h1 f (drop 2 . take 3 $ choice) [True,True,True] m n-                | drop 1 (take 2 choice) == "1" = h1 f (drop 2 . take 3 $ choice) [True,True,False] m n-                | drop 1 (take 2 choice) == "2" = h1 f (drop 2 . take 3 $ choice) [True,False,True] m n-                | drop 1 (take 2 choice) == "3" = h1 f (drop 2 . take 3 $ choice) [True,False,False] m n-                | drop 1 (take 2 choice) == "4" = h2 f (drop 2 . take 3 $ choice) [True,True,True] m n-                | drop 1 (take 2 choice) == "5" = h2 f (drop 2 . take 3 $ choice) [True,True,False] m n-                | drop 1 (take 2 choice) == "6" = h2 f (drop 2 . take 3 $ choice) [True,False,True] m n-                | drop 1 (take 2 choice) == "7" = h2 f (drop 2 . take 3 $ choice) [True,False,False] m n-                | otherwise = \_ -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF4 n syllableDurationsDs) tttt-              w1F f ch rh = rhythmicityABC 1.0 2.0 0.125 ch rh . mconcat . f . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-              wwF2 g2 xs =-                let n1 = readMaybe xs::Maybe Int in-                   case n1 of-                     Just n2 -> g2 (helperHF4 n2 syllableDurationsDs)-                     Nothing -> g2 syllableDurationsD4-              x1F f ch rh = rhythmicityABC0 1.0 2.0 0.125 ch rh . mconcat . f . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-              xxF = wwF2 x1F-              wwF = wwF2 w1F-              {-# INLINE w1F #-}-              {-# INLINE wwF2 #-}-              {-# INLINE x1F #-}-              {-# INLINE xxF #-}-              {-# INLINE wwF #-}-rhythmicityH'Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k choice syllableDurationsDs (CF2 x y) tttt@(Str tttts) =- case take 1 choice of-  "0" -> if choice `elem` ["0z","02z","03z","04z"] then rhythmicityKFHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13-           tup14 tup15 tup16 tup17 (helperHF4 (case last choice of {'2' -> 2; '3' -> 3; '4' -> 4; ~rrrrr -> 1}) syllableDurationsDs) k-             (fromMaybe 1.0 x) (fromMaybe 1.0 y) tttt-          else rhythmicityKHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-            (helperHF4 (case last choice of {'2' -> 2; '3' -> 3; '4' -> 4; ~rrrrr -> 1}) syllableDurationsDs) (fromMaybe 1.0 x) (fromMaybe 1.0 y) tttt-  "w" -> if-          | (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "4" ->-             case take 2 choice of-              "w0" -> wwF (drop 2 . take 3 $ choice) (Ch 1 1 4) (Rhythm 1 1 2) tttts-              "w1" -> wwF (drop 2 . take 3 $ choice) (Ch 1 0 4) (Rhythm 2 1 1) tttts-              "w2" -> wwF (drop 2 . take 3 $ choice) (Ch 0 1 4) (Rhythm 1 2 1) tttts-              "w3" -> wwF (drop 2 . take 3 $ choice) (Ch 0 0 4) (Rhythm 1 1 2) tttts-              _ -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF4 1 syllableDurationsDs) tttt-          | otherwise -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF4 1 syllableDurationsDs) tttt-              where w1F f ch rh = rhythmicityABC 1.0 (fromMaybe 2.0 x) (fromMaybe 0.125 y) ch rh . mconcat . f . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-                    wwF xs =-                      let n1 = readMaybe xs::Maybe Int in-                        case n1 of-                         Just n2 -> w1F (helperHF4 n2 syllableDurationsDs)-                         Nothing -> w1F syllableDurationsD4-                    {-# INLINE w1F #-}-                    {-# INLINE wwF #-}-  "x" -> if-          | (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "4" ->-             case take 2 choice of-              "x0" -> xxF (drop 2 . take 3 $ choice) (Ch 1 1 4) (Rhythm 1 1 2) tttts-              "x1" -> xxF (drop 2 . take 3 $ choice) (Ch 1 0 4) (Rhythm 2 1 1) tttts-              "x2" -> xxF (drop 2 . take 3 $ choice) (Ch 0 1 4) (Rhythm 1 2 1) tttts-              "x3" -> xxF (drop 2 . take 3 $ choice) (Ch 0 0 4) (Rhythm 1 1 2) tttts-              _ -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF4 1 syllableDurationsDs) tttt-          | otherwise -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF4 1 syllableDurationsDs) tttt-              where x1F f ch rh = rhythmicityABC0 1.0 (fromMaybe 2.0 x) (fromMaybe 0.125 y) ch rh . mconcat . f . createSyllablesUkrSTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-                    xxF xs =-                      let n1 = readMaybe xs::Maybe Int in-                        case n1 of-                         Just n2 -> x1F (helperHF4 n2 syllableDurationsDs)-                         Nothing -> x1F syllableDurationsD4-                    {-# INLINE x1F #-}-                    {-# INLINE xxF #-}-  _ -> if-     | ((take 1 choice >= "b" && take 1 choice <= "v") || (take 1 choice >= "A" && take 1 choice <= "Z" && take 1 choice `notElem` ["G","H"])) -> rhythmicityH'Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k choice syllableDurationsDs CF0 tttt-     | otherwise -> rhythmicityKHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 -        (let ts = drop 2 . take 3 $ choice in-          case ts of { [] -> syllableDurationsD4 ; ks ->-            let q = readMaybe ks::Maybe Int in-              case q of {Just q' -> helperHF4 q' syllableDurationsDs; ~Nothing -> syllableDurationsD4 }})-                (fromMaybe 1.0 x) (fromMaybe 1.0 y) tttt-rhythmicityH'Tup _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ = -3.0--rhythmicitya'Tup-  :: Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Int8)-  -> Array Int (Int8, FlowSound -> Sound8)-  -> Array Int (Int8, Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int ([Int8], Bool)-  -> Array Int (Int8, [Int8])-  -> Array Int (Char,Int8)-  -> Array Int (Int8,[Int8])-  -> Array Int (Char, Bool)-  -> Array Int (Char, Bool)-  -> Array Int (Int8,Bool)-  -> Double-  -> String-  -> [[[[Sound8]]] -> [[Double]]]-  -> Coeffs2-  -> String-  -> ReadyForConstructionUkr-  -> Double-rhythmicitya'Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k choice syllableDurationsDs CF0 bbs tttt@(FSL tttts)= if- | take 1 choice `elem` ["c","M","N"] || (take 1 choice >= "A" && take 1 choice <= "F") -> let just_probe = readRhythmicity choice in-           (case just_probe of-             Just (P1 ch rh n) -> rhythmicityABC 1.0 2.0 0.125 ch rh . rhythmicityGTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (helperHF1 n syllableDurationsDs)-             Just (P2 ch rh r n) -> (case take 1 choice of-                   "A" -> rhythmicityPolyWeightedLEF2 1.0 r ch rh-                   "D" -> rhythmicityPolyWeightedLF2 1.0 r ch rh-                   "E" -> rhythmicityPolyWeightedLEF3 1.0 r ch rh-                   "F" -> rhythmicityPolyWeightedLF3 1.0 r ch rh-                   "B" -> rhythmicityPolyWeightedEF2 1.0 r ch rh-                   "C" -> rhythmicityPolyWeightedF2 1.0 r ch rh-                   "M" -> rhythmicityPolyWeightedEF3 1.0 r ch rh-                   "N" -> rhythmicityPolyWeightedF3 1.0 r ch rh-                   "c" -> rhythmicityPoly 1.0 r ch rh) . rhythmicityGTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 n syllableDurationsDs)-             _ -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs))  tttt- | choice == "0y" -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) tttt- | take 1 choice == "0" && drop 2 (take 3 choice) == "y" ->-    let n2 = readMaybe (drop 1 . take 2 $ choice)::Maybe Int in-      rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-          (helperHF1 (case n2 of {Just n3 -> n3; Nothing -> 1}) syllableDurationsDs) tttt- | choice == "0z" -> rhythmicity0FHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) k tttt- | take 1 choice == "0" && drop 2 (take 3 choice) == "z" ->-    let n2 = readMaybe (drop 1 . take 2 $ choice)::Maybe Int in-      rhythmicity0FHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-          (helperHF1 (case n2 of {Just n3 -> n3; Nothing -> 1}) syllableDurationsDs) k tttt- | take 1 choice == "0" -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) tttt- | take 1 choice == "w" -> if-          | (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "4" ->-             (case take 2 choice of-              "w0" -> wwF (drop 2 . take 3 $ choice) (Ch 1 1 4) (Rhythm 1 1 2) -              "w1" -> wwF (drop 2 . take 3 $ choice) (Ch 1 0 4) (Rhythm 2 1 1) -              "w2" -> wwF (drop 2 . take 3 $ choice) (Ch 0 1 4) (Rhythm 1 2 1) -              "w3" -> wwF (drop 2 . take 3 $ choice) (Ch 0 0 4) (Rhythm 1 1 2) -              _ -> \_ -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) tttt) tttts-          | otherwise -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) tttt- | take 1 choice == "x" -> if-          | (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "4" ->-             (case take 2 choice of-              "x0" -> xxF (drop 2 . take 3 $ choice) (Ch 1 1 4) (Rhythm 1 1 2)-              "x1" -> xxF (drop 2 . take 3 $ choice) (Ch 1 0 4) (Rhythm 2 1 1)-              "x2" -> xxF (drop 2 . take 3 $ choice) (Ch 0 1 4) (Rhythm 1 2 1)-              "x3" -> xxF (drop 2 . take 3 $ choice) (Ch 0 0 4) (Rhythm 1 1 2)-              _ -> \_ -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) tttt) tttts-          | otherwise -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) tttt- | otherwise -> if-    | (take 1 choice == "b" || ((take 1 choice >= "d" && take 1 choice <= "v") || (take 1 choice >= "I" && take 1 choice <= "Z"))) && (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "9" ->-        (case take 1 choice of-          "b" -> g rhythmicityPolyWeightedLEF3 5 1-          "d" -> g rhythmicityPolyWeightedLEF30 5 1-          "e" -> g rhythmicityPolyWeightedLEF3 6 2-          "f" -> g rhythmicityPolyWeightedLEF30 6 2-          "g" -> g rhythmicityPolyWeightedLEF2 5 1-          "h" -> g rhythmicityPolyWeightedLEF20 5 1-          "i" -> g rhythmicityPolyWeightedLEF2 6 2-          "j" -> g rhythmicityPolyWeightedLEF20 6 2-          "k" -> g rhythmicityPolyWeightedLF3 5 1-          "l" -> g rhythmicityPolyWeightedLF30 5 1-          "m" -> g rhythmicityPolyWeightedLF3 6 2-          "n" -> g rhythmicityPolyWeightedLF30 6 2-          "o" -> g rhythmicityPolyWeightedLF2 5 1-          "p" -> g rhythmicityPolyWeightedLF20 5 1-          "q" -> g rhythmicityPolyWeightedLF2 6 2-          "r" -> g rhythmicityPolyWeightedLF20 6 2-          "I" -> g rhythmicityPolyWeightedEF3 5 1-          "J" -> g rhythmicityPolyWeightedEF30 5 1-          "K" -> g rhythmicityPolyWeightedEF3 6 2-          "L" -> g rhythmicityPolyWeightedEF30 6 2-          "O" -> g rhythmicityPolyWeightedEF2 5 1-          "P" -> g rhythmicityPolyWeightedEF20 5 1-          "Q" -> g rhythmicityPolyWeightedEF2 6 2-          "R" -> g rhythmicityPolyWeightedEF20 6 2-          "W" -> g rhythmicityPolyWeightedF3 5 1-          "X" -> g rhythmicityPolyWeightedF30 5 1-          "Y" -> g rhythmicityPolyWeightedF3 6 2-          "Z" -> g rhythmicityPolyWeightedF30 6 2-          "U" -> g rhythmicityPolyWeightedF2 5 1-          "V" -> g rhythmicityPolyWeightedF20 5 1-          "S" -> g rhythmicityPolyWeightedF2 6 2-          "T" -> g rhythmicityPolyWeightedF20 6 2-          "u" -> g rhythmicityPoly 5 1-          "v" -> g rhythmicityPoly0 5 1-          "s" -> g rhythmicityPoly 6 2-          "t" -> g rhythmicityPoly0 6 2) tttts-    | otherwise -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-       (let ts = drop 2 . take 3 $ choice in-          case ts of { [] -> (\_ -> [[-1.0]]) ; ks ->-            let q = readMaybe ks::Maybe Int in-              case q of {Just q' -> helperHF1 q' syllableDurationsDs; ~Nothing -> (\_ -> [[-1.0]]) }}) tttt-        where h1 f ts xs m n = f 1.0 4 (PolyCh xs m) (PolyRhythm [1,2,1,n]) . mconcat .-                  (case ts of { [] -> (\_ -> [[-1.0]]) ; ks -> let q = readMaybe ks::Maybe Int in-                      case q of {Just q' -> helperHF1 q' syllableDurationsDs; ~Nothing -> (\_ -> [[-1.0]]) }})-              h2 f ts xs m n = f 1.0 4 (PolyCh xs m) (PolyRhythm [2,1,1,n]) . mconcat .-                  (case ts of { [] -> (\_ -> [[-1.0]]) ; ks -> let q = readMaybe ks::Maybe Int in-                      case q of {Just q' -> helperHF1 q' syllableDurationsDs; ~Nothing -> (\_ -> [[-1.0]]) }})-              g f m n-                | drop 1 (take 2 choice) == "0" = h1 f (drop 2 . take 3 $ choice) [True,True,True] m n-                | drop 1 (take 2 choice) == "1" = h1 f (drop 2 . take 3 $ choice) [True,True,False] m n-                | drop 1 (take 2 choice) == "2" = h1 f (drop 2 . take 3 $ choice) [True,False,True] m n-                | drop 1 (take 2 choice) == "3" = h1 f (drop 2 . take 3 $ choice) [True,False,False] m n-                | drop 1 (take 2 choice) == "4" = h2 f (drop 2 . take 3 $ choice) [True,True,True] m n-                | drop 1 (take 2 choice) == "5" = h2 f (drop 2 . take 3 $ choice) [True,True,False] m n-                | drop 1 (take 2 choice) == "6" = h2 f (drop 2 . take 3 $ choice) [True,False,True] m n-                | drop 1 (take 2 choice) == "7" = h2 f (drop 2 . take 3 $ choice) [True,False,False] m n-                | otherwise = \_ -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 n syllableDurationsDs) tttt-              w1F f ch rh = rhythmicityABC 1.0 2.0 0.125 ch rh . mconcat . f . (\_ -> tttts)-              wwF2 g2 xs =-                let n1 = readMaybe xs::Maybe Int in-                   case n1 of-                     Just n2 -> g2 (helperHF1 n2 syllableDurationsDs)-                     Nothing -> g2 (\_ -> [[-1.0]])-              x1F f ch rh = rhythmicityABC0 1.0 2.0 0.125 ch rh . mconcat . f . (\_ -> tttts)-              xxF = wwF2 x1F-              wwF = wwF2 w1F-              {-# INLINE w1F #-}-              {-# INLINE wwF2 #-}-              {-# INLINE x1F #-}-              {-# INLINE xxF #-}-              {-# INLINE wwF #-}-rhythmicitya'Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k choice syllableDurationsDs (CF2 x y) bbs tttt@(FSL tttts) =- case take 1 choice of-  "0" -> if choice `elem` ["0z","02z","03z","04z"] then rhythmicityKFHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14-           tup15 tup16 tup17 (helperHF1 (case last choice of {'2' -> 2; '3' -> 3; '4' -> 4; ~rrrrr -> 1}) syllableDurationsDs) k (fromMaybe 1.0 x)-             (fromMaybe 1.0 y) tttt-         else rhythmicityKHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-           (helperHF1 (case last choice of {'2' -> 2; '3' -> 3; '4' -> 4; ~rrrrr -> 1}) syllableDurationsDs) (fromMaybe 1.0 x) (fromMaybe 1.0 y) tttt-  "w" -> if-          | (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "4" ->-             (case take 2 choice of-              "w0" -> wwF (drop 2 . take 3 $ choice) (Ch 1 1 4) (Rhythm 1 1 2) -              "w1" -> wwF (drop 2 . take 3 $ choice) (Ch 1 0 4) (Rhythm 2 1 1) -              "w2" -> wwF (drop 2 . take 3 $ choice) (Ch 0 1 4) (Rhythm 1 2 1) -              "w3" -> wwF (drop 2 . take 3 $ choice) (Ch 0 0 4) (Rhythm 1 1 2) -              _ -> \_ -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs)  tttt) tttts-          | otherwise -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) tttt-              where w1F f ch rh = rhythmicityABC 1.0 (fromMaybe 2.0 x) (fromMaybe 0.125 y) ch rh . mconcat . f . (\_ -> tttts)-                    wwF xs =-                      let n1 = readMaybe xs::Maybe Int in-                        case n1 of-                         Just n2 -> w1F (helperHF1 n2 syllableDurationsDs)-                         Nothing -> w1F (\_ -> [[-1.0]])-                    {-# INLINE w1F #-}-                    {-# INLINE wwF #-}-  "x" -> if-          | (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "4" ->-             (case take 2 choice of-              "x0" -> xxF (drop 2 . take 3 $ choice) (Ch 1 1 4) (Rhythm 1 1 2) -              "x1" -> xxF (drop 2 . take 3 $ choice) (Ch 1 0 4) (Rhythm 2 1 1) -              "x2" -> xxF (drop 2 . take 3 $ choice) (Ch 0 1 4) (Rhythm 1 2 1) -              "x3" -> xxF (drop 2 . take 3 $ choice) (Ch 0 0 4) (Rhythm 1 1 2) -              _ -> \_ -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) tttt) tttts-          | otherwise -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) tttt-              where x1F f ch rh = rhythmicityABC0 1.0 (fromMaybe 2.0 x) (fromMaybe 0.125 y) ch rh . mconcat . f . (\_ -> tttts)-                    xxF xs =-                      let n1 = readMaybe xs::Maybe Int in-                        case n1 of-                         Just n2 -> x1F (helperHF1 n2 syllableDurationsDs)-                         Nothing -> x1F (\_ -> [[-1.0]])-                    {-# INLINE x1F #-}-                    {-# INLINE xxF #-}-  _ -> if-     | ((take 1 choice >= "b" && take 1 choice <= "v") || (take 1 choice >= "A" && take 1 choice <= "Z" && take 1 choice `notElem` ["G","H"])) -> rhythmicityH'Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k choice syllableDurationsDs CF0 tttt-     | otherwise -> rhythmicityKHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-        (let ts = drop 2 . take 3 $ choice in-          case ts of { [] -> (\_ -> [[-1.0]]) ; ks ->-            let q = readMaybe ks::Maybe Int in-              case q of {Just q' -> helperHF1 q' syllableDurationsDs; ~Nothing -> (\_ -> [[-1.0]]) }})-                (fromMaybe 1.0 x) (fromMaybe 1.0 y) tttt-rhythmicitya'Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k choice syllableDurationsDs CF0 bbs tttt@(Str tttts@(_:_))= if- | take 1 choice `elem` ["c","M","N"] || (take 1 choice >= "A" && take 1 choice <= "F") -> let just_probe = readRhythmicity choice in-           (case just_probe of-             Just (P1 ch rh n) -> rhythmicityABC 1.0 2.0 0.125 ch rh . rhythmicityGTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 (helperHF1 n syllableDurationsDs)-             Just (P2 ch rh r n) -> (case take 1 choice of-                   "A" -> rhythmicityPolyWeightedLEF2 1.0 r ch rh-                   "D" -> rhythmicityPolyWeightedLF2 1.0 r ch rh-                   "E" -> rhythmicityPolyWeightedLEF3 1.0 r ch rh-                   "F" -> rhythmicityPolyWeightedLF3 1.0 r ch rh-                   "B" -> rhythmicityPolyWeightedEF2 1.0 r ch rh-                   "C" -> rhythmicityPolyWeightedF2 1.0 r ch rh-                   "M" -> rhythmicityPolyWeightedEF3 1.0 r ch rh-                   "N" -> rhythmicityPolyWeightedF3 1.0 r ch rh-                   "c" -> rhythmicityPoly 1.0 r ch rh) . rhythmicityGTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 n syllableDurationsDs)-             _ -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs))  tttt- | choice == "0y" -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) tttt- | take 1 choice == "0" && drop 2 (take 3 choice) == "y" ->-    let n2 = readMaybe (drop 1 . take 2 $ choice)::Maybe Int in-      rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-          (helperHF1 (case n2 of {Just n3 -> n3; Nothing -> 1}) syllableDurationsDs) tttt- | choice == "0z" -> rhythmicity0FHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) k tttt- | take 1 choice == "0" && drop 2 (take 3 choice) == "z" ->-    let n2 = readMaybe (drop 1 . take 2 $ choice)::Maybe Int in-      rhythmicity0FHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-          (helperHF1 (case n2 of {Just n3 -> n3; Nothing -> 1}) syllableDurationsDs) k tttt- | take 1 choice == "0" -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) tttt- | take 1 choice == "w" -> if-          | (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "4" ->-             (case take 2 choice of-              "w0" -> wwF (drop 2 . take 3 $ choice) (Ch 1 1 4) (Rhythm 1 1 2) -              "w1" -> wwF (drop 2 . take 3 $ choice) (Ch 1 0 4) (Rhythm 2 1 1) -              "w2" -> wwF (drop 2 . take 3 $ choice) (Ch 0 1 4) (Rhythm 1 2 1) -              "w3" -> wwF (drop 2 . take 3 $ choice) (Ch 0 0 4) (Rhythm 1 1 2) -              _ -> \_ -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) tttt) tttts-          | otherwise -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) tttt- | take 1 choice == "x" -> if-          | (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "4" ->-             (case take 2 choice of-              "x0" -> xxF (drop 2 . take 3 $ choice) (Ch 1 1 4) (Rhythm 1 1 2)-              "x1" -> xxF (drop 2 . take 3 $ choice) (Ch 1 0 4) (Rhythm 2 1 1)-              "x2" -> xxF (drop 2 . take 3 $ choice) (Ch 0 1 4) (Rhythm 1 2 1)-              "x3" -> xxF (drop 2 . take 3 $ choice) (Ch 0 0 4) (Rhythm 1 1 2)-              _ -> \_ -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) tttt) tttts-          | otherwise -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) tttt- | otherwise -> if-    | (take 1 choice == "b" || ((take 1 choice >= "d" && take 1 choice <= "v") || (take 1 choice >= "I" && take 1 choice <= "Z"))) && (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "9" ->-        (case take 1 choice of-          "b" -> g rhythmicityPolyWeightedLEF3 5 1-          "d" -> g rhythmicityPolyWeightedLEF30 5 1-          "e" -> g rhythmicityPolyWeightedLEF3 6 2-          "f" -> g rhythmicityPolyWeightedLEF30 6 2-          "g" -> g rhythmicityPolyWeightedLEF2 5 1-          "h" -> g rhythmicityPolyWeightedLEF20 5 1-          "i" -> g rhythmicityPolyWeightedLEF2 6 2-          "j" -> g rhythmicityPolyWeightedLEF20 6 2-          "k" -> g rhythmicityPolyWeightedLF3 5 1-          "l" -> g rhythmicityPolyWeightedLF30 5 1-          "m" -> g rhythmicityPolyWeightedLF3 6 2-          "n" -> g rhythmicityPolyWeightedLF30 6 2-          "o" -> g rhythmicityPolyWeightedLF2 5 1-          "p" -> g rhythmicityPolyWeightedLF20 5 1-          "q" -> g rhythmicityPolyWeightedLF2 6 2-          "r" -> g rhythmicityPolyWeightedLF20 6 2-          "I" -> g rhythmicityPolyWeightedEF3 5 1-          "J" -> g rhythmicityPolyWeightedEF30 5 1-          "K" -> g rhythmicityPolyWeightedEF3 6 2-          "L" -> g rhythmicityPolyWeightedEF30 6 2-          "O" -> g rhythmicityPolyWeightedEF2 5 1-          "P" -> g rhythmicityPolyWeightedEF20 5 1-          "Q" -> g rhythmicityPolyWeightedEF2 6 2-          "R" -> g rhythmicityPolyWeightedEF20 6 2-          "W" -> g rhythmicityPolyWeightedF3 5 1-          "X" -> g rhythmicityPolyWeightedF30 5 1-          "Y" -> g rhythmicityPolyWeightedF3 6 2-          "Z" -> g rhythmicityPolyWeightedF30 6 2-          "U" -> g rhythmicityPolyWeightedF2 5 1-          "V" -> g rhythmicityPolyWeightedF20 5 1-          "S" -> g rhythmicityPolyWeightedF2 6 2-          "T" -> g rhythmicityPolyWeightedF20 6 2-          "u" -> g rhythmicityPoly 5 1-          "v" -> g rhythmicityPoly0 5 1-          "s" -> g rhythmicityPoly 6 2-          "t" -> g rhythmicityPoly0 6 2) . convFI bbs $  tttts-    | otherwise -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-       (let ts = drop 2 . take 3 $ choice in-          case ts of { [] -> (\_ -> [[-1.0]]) ; ks ->-            let q = readMaybe ks::Maybe Int in-              case q of {Just q' -> helperHF1 q' syllableDurationsDs; ~Nothing -> (\_ -> [[-1.0]]) }}) tttt-        where h1 f ts xs m n = f 1.0 4 (PolyCh xs m) (PolyRhythm [1,2,1,n]) . mconcat .-                  (case ts of { [] -> (\_ -> [[-1.0]]) ; ks -> let q = readMaybe ks::Maybe Int in-                      case q of {Just q' -> helperHF1 q' syllableDurationsDs; ~Nothing -> (\_ -> [[-1.0]]) }})-              h2 f ts xs m n = f 1.0 4 (PolyCh xs m) (PolyRhythm [2,1,1,n]) . mconcat .-                  (case ts of { [] -> (\_ -> [[-1.0]]) ; ks -> let q = readMaybe ks::Maybe Int in-                      case q of {Just q' -> helperHF1 q' syllableDurationsDs; ~Nothing -> (\_ -> [[-1.0]]) }})-              g f m n-                | drop 1 (take 2 choice) == "0" = h1 f (drop 2 . take 3 $ choice) [True,True,True] m n-                | drop 1 (take 2 choice) == "1" = h1 f (drop 2 . take 3 $ choice) [True,True,False] m n-                | drop 1 (take 2 choice) == "2" = h1 f (drop 2 . take 3 $ choice) [True,False,True] m n-                | drop 1 (take 2 choice) == "3" = h1 f (drop 2 . take 3 $ choice) [True,False,False] m n-                | drop 1 (take 2 choice) == "4" = h2 f (drop 2 . take 3 $ choice) [True,True,True] m n-                | drop 1 (take 2 choice) == "5" = h2 f (drop 2 . take 3 $ choice) [True,True,False] m n-                | drop 1 (take 2 choice) == "6" = h2 f (drop 2 . take 3 $ choice) [True,False,True] m n-                | drop 1 (take 2 choice) == "7" = h2 f (drop 2 . take 3 $ choice) [True,False,False] m n-                | otherwise = \_ -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 n syllableDurationsDs) tttt-              w1F f ch rh = rhythmicityABC 1.0 2.0 0.125 ch rh . mconcat . f . (\_ -> tttts)-              wwF2 g2 xs =-                let n1 = readMaybe xs::Maybe Int in-                   case n1 of-                     Just n2 -> g2 (helperHF1 n2 syllableDurationsDs . convFI bbs)-                     Nothing -> g2 (\_ -> [[-1.0]])-              x1F f ch rh = rhythmicityABC0 1.0 2.0 0.125 ch rh . mconcat . f . (\_ -> tttts)-              xxF = wwF2 x1F-              wwF = wwF2 w1F-              {-# INLINE w1F #-}-              {-# INLINE wwF2 #-}-              {-# INLINE x1F #-}-              {-# INLINE xxF #-}-              {-# INLINE wwF #-}-rhythmicitya'Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k choice syllableDurationsDs (CF2 x y) bbs tttt@(Str tttts@(_:_)) =- case take 1 choice of-  "0" -> if choice `elem` ["0z","02z","03z","04z"] then rhythmicityKFHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14-           tup15 tup16 tup17 (helperHF1 (case last choice of {'2' -> 2; '3' -> 3; '4' -> 4; ~rrrrr -> 1}) syllableDurationsDs) k (fromMaybe 1.0 x)-             (fromMaybe 1.0 y) tttt-         else rhythmicityKHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-           (helperHF1 (case last choice of {'2' -> 2; '3' -> 3; '4' -> 4; ~rrrrr -> 1}) syllableDurationsDs) (fromMaybe 1.0 x) (fromMaybe 1.0 y) tttt-  "w" -> if-          | (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "4" ->-             (case take 2 choice of-              "w0" -> wwF (drop 2 . take 3 $ choice) (Ch 1 1 4) (Rhythm 1 1 2) -              "w1" -> wwF (drop 2 . take 3 $ choice) (Ch 1 0 4) (Rhythm 2 1 1) -              "w2" -> wwF (drop 2 . take 3 $ choice) (Ch 0 1 4) (Rhythm 1 2 1) -              "w3" -> wwF (drop 2 . take 3 $ choice) (Ch 0 0 4) (Rhythm 1 1 2) -              _ -> \_ -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs)  tttt) tttts-          | otherwise -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) tttt-              where w1F f ch rh = rhythmicityABC 1.0 (fromMaybe 2.0 x) (fromMaybe 0.125 y) ch rh . mconcat . f . (\_ -> tttts)-                    wwF xs =-                      let n1 = readMaybe xs::Maybe Int in-                        case n1 of-                         Just n2 -> w1F (helperHF1 n2 syllableDurationsDs . convFI bbs) -                         Nothing -> w1F (\_ -> [[-1.0]])-                    {-# INLINE w1F #-}-                    {-# INLINE wwF #-}-  "x" -> if-          | (drop 2 . take 3 $ choice) >= "1" && (drop 2 . take 3 $ choice) <= "4" ->-             (case take 2 choice of-              "x0" -> xxF (drop 2 . take 3 $ choice) (Ch 1 1 4) (Rhythm 1 1 2) -              "x1" -> xxF (drop 2 . take 3 $ choice) (Ch 1 0 4) (Rhythm 2 1 1) -              "x2" -> xxF (drop 2 . take 3 $ choice) (Ch 0 1 4) (Rhythm 1 2 1) -              "x3" -> xxF (drop 2 . take 3 $ choice) (Ch 0 0 4) (Rhythm 1 1 2) -              _ -> \_ -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) tttt) tttts-          | otherwise -> rhythmicity0HTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17  (helperHF1 1 syllableDurationsDs) tttt-              where x1F f ch rh = rhythmicityABC0 1.0 (fromMaybe 2.0 x) (fromMaybe 0.125 y) ch rh . mconcat . f . (\_ -> tttts)-                    xxF xs =-                      let n1 = readMaybe xs::Maybe Int in-                        case n1 of-                         Just n2 -> x1F (helperHF1 n2 syllableDurationsDs . convFI bbs)-                         Nothing -> x1F (\_ -> [[-1.0]])-                    {-# INLINE x1F #-}-                    {-# INLINE xxF #-}-  _ -> if-     | ((take 1 choice >= "b" && take 1 choice <= "v") || (take 1 choice >= "A" && take 1 choice <= "Z" && take 1 choice `notElem` ["G","H"])) -> rhythmicityH'Tup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17 k choice syllableDurationsDs CF0 tttt-     | otherwise -> rhythmicityKHTup tup1 tup2 tup3 tup4 tup5 tup6 tup7 tup8 tup9 tup10 tup11 tup12 tup13 tup14 tup15 tup16 tup17-        (let ts = drop 2 . take 3 $ choice in-          case ts of { [] -> (\_ -> [[-1.0]]) ; ks ->-            let q = readMaybe ks::Maybe Int in-              case q of {Just q' -> helperHF1 q' syllableDurationsDs; ~Nothing -> (\_ -> [[-1.0]]) }})-                (fromMaybe 1.0 x) (fromMaybe 1.0 y) tttt--rhythmicitya'Tup _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ = -2.0
− Phonetic/Languages/Emphasis.hs
@@ -1,137 +0,0 @@-{-# LANGUAGE BangPatterns #-}----module Phonetic.Languages.Emphasis where--import Languages.Phonetic.Ukrainian.Syllable.ArrInt8-import Melodics.Ukrainian.ArrInt8-import Languages.Phonetic.Ukrainian.Syllable.Double.ArrInt8 (syllableDurationsGD)-import GHC.Int-import Data.Maybe (fromMaybe)-import Text.Read (readMaybe)-import Data.Char (toUpper)-import GHC.Arr-import Data.List (scanl',intersperse)-import CaseBi.Arr-import CaseBi.Arr (getBFst',getBFstLSorted')-import Data.Lists.FLines (newLineEnding)-import Data.Traversable (traverse)-import Control.Applicative-import System.IO--data SyllWeights = Sy {-  point :: !FlowSound-  , order :: !Int8 -- Is intended to begin at -128 up to 0 (maximum 129 entries).-  , weight :: !Double-}--instance Show SyllWeights where-  show (Sy ps i w) = showFS ps `mappend` (' ':show i) `mappend` (' ':show w) `mappend` newLineEnding--weightSyllablesIO :: [FlowSound] -> IO [SyllWeights]-weightSyllablesIO = traverse (\(i,xs) -> (\d1 -> (Sy xs i d1)) <$> weightSyllAIO False xs)  . zip ([-128..0]::[Int8])--weightStringIO :: String -> IO ([[FlowSound]],[SyllWeights],[[FlowSound]])-weightStringIO xs = weightSyllablesIO fss >>= \zs -> pure (tsss, zs, helper1F . scanl' (+) (-128::Int8) . map (fromIntegral . length) $ tsss)-  where tsss = createSyllablesUkrS xs-        fss = [ ts | tss <- tsss , ts <- tss ]--weightStringNIO :: Int ->  String -> IO ([[FlowSound]],[[SyllWeights]],[[FlowSound]])-weightStringNIO n xs = traverse (\_-> weightSyllablesIO fss) [1..n] >>= \zss -> pure (tsss, zss, helper1F . scanl' (+) (-128::Int8) . map (fromIntegral . length) $ tsss)-  where tsss = createSyllablesUkrS xs-        fss = [ ts | tss <- tsss , ts <- tss ]--weights2SyllableDurationsDArr :: [SyllWeights] -> Array Int (Sound8,Double)-weights2SyllableDurationsDArr xs = listArray (0,l-1) . map (\(Sy _ i w) -> (i,w)) $ xs-  where l = length xs--weights2SyllableDurationsD :: [SyllWeights] -> [[[Sound8]]] -> [[Double]]-weights2SyllableDurationsD xs = syllableDurationsGD (getBFst' (4.0, weights2SyllableDurationsDArr xs))-{-# INLINE weights2SyllableDurationsD #-}--helper1F :: [Int8] -> [[FlowSound]]-helper1F (x:y:ys) = map (:[]) [x..y-1]:helper1F (y:ys)-helper1F _ = []--weightSyllAIO :: Bool -> FlowSound -> IO Double-weightSyllAIO upper xs-  | null xs = pure 4.0-  | otherwise = -    (\d -> fromMaybe 4.0 (readMaybe d::Maybe Double)) <$> (hPutStr stderr ("?  " `mappend` ((if upper then map toUpper else id) . showFS $ xs) `mappend` "   ") *> getLine) -- Well, definitely it should not be 'stderr' here, but 'stdout' gives some strange behaviour, probably related to optimizations or some strange 'Handle' behaviour. (?)---data ReadyForConstructionUkr = Str String | FSL [[FlowSound]] deriving (Eq,Ord)--showR :: ReadyForConstructionUkr -> String-showR (Str xs) = xs-showR (FSL tsss) = show tsss--isStr :: ReadyForConstructionUkr -> Bool-isStr (Str _) = True-isStr _ = False--isFSL :: ReadyForConstructionUkr -> Bool-isFSL (FSL _) = True-isFSL _ = False--fromReadyFCUkrS :: ReadyForConstructionUkr -> Maybe String-fromReadyFCUkrS (Str xs) = Just xs-fromReadyFCUkrS _ = Nothing--fromReadyFCUkrF :: ReadyForConstructionUkr -> Maybe [[FlowSound]]-fromReadyFCUkrF (FSL xsss) = Just xsss-fromReadyFCUkrF _ = Nothing--helper2F :: [b] -> [a] -> [a] -> [[a]] -> [([b],[a],[a])]-helper2F vs xs ys tss = let (us,ks,rs) = unzip3 . zip3 vs xs $ ys in-  helper2F' us ks rs tss-    where helper2F' us@(_:_) ks@(_:_) rs@(_:_) tss@(ts:wss) =-            let l = length ts-                (wws,vvs) = splitAt l us-                (qs,ps) = splitAt l ks-                (ns,ms) = splitAt l rs-                in (wws,qs,ns):helper2F' vvs ps ms wss-          helper2F' _ _ _ _ = []- -convF1 :: String -> [[FlowSound]]-convF1 xs- | null xs = []- | otherwise = [ tss | tss <- createSyllablesUkrS xs ]--convF3 :: String -> [([String],[FlowSound],[FlowSound])]-convF3 xs- | null xs = [([],[],[])]- | otherwise = helper2F (concatMap (map showFS) tsss) (map (:[]) ([-128..0]::[Int8])) [ ts | tss <- qss, ts <- tss ] qss-    where tsss = createSyllablesUkrS xs-          qss = [ tss | tss <- tsss ]--convF3W :: String -> [(String,[FlowSound])]-convF3W xs- | null xs = [([],[])]- | otherwise = zipWith (\(_,ys,_) ts -> (ts,ys)) (convF3 xs) . words $ xs--convFI :: String -> String -> [[FlowSound]]-convFI ts = map f . words-  where !f = getBFstL' [] (convF3W ts)--convFSL :: String -> ReadyForConstructionUkr -> String-convFSL ts r@(Str xs) = concat . concat . intersperse [" "] . map (\(ks,_,_)-> ks) . convF3 $ xs-   where js =  unzip . map (\(rs,ps,_) -> (ps,rs)) . convF3 $ ts-convFSL ts r@(FSL tsss) =  concat . concat . intersperse [" "] . map (map (getBFstLSorted' " " ks) ) $ tsss-   where js = unzip . map (\(rs,ps,_) -> (ps,rs)) . convF3 $ ts-         ks = zip (concat . fst $ js) (concat . snd $ js)--weightsString3IO :: Bool -> String -> IO ([[FlowSound]],[[[FlowSound]] -> [[Double]]],ReadyForConstructionUkr)-weightsString3IO bool bs - | bool = do-   (syllDs1,sylws,fsls0) <- weightStringIO bs-   let syllableDurationsD2s = [weights2SyllableDurationsD sylws]-   return (syllDs1,syllableDurationsD2s,FSL fsls0) - | otherwise = return ([],[],FSL [])--weightsString3NIO :: Int -> Bool -> String -> IO ([[FlowSound]],[[[FlowSound]] -> [[Double]]],ReadyForConstructionUkr)-weightsString3NIO n bool bs - | bool = (\(syllDs1,sylws,fsls0) -> (syllDs1,map weights2SyllableDurationsD sylws,FSL fsls0)) <$> weightStringNIO n bs- | otherwise = pure ([],[],FSL [])-
phonetic-languages-simplified-properties-array.cabal view
@@ -2,14 +2,14 @@ -- For further documentation, see http://haskell.org/cabal/users-guide/  name:                phonetic-languages-simplified-properties-array-version:             0.16.0.0+version:             0.17.2.0 synopsis:            Some properties of the data related to rhythmicity. description:         A generalization of the uniqueness-periods-vector-properties package. Is a simplified version of the functionality of the former one. Uses lists and arrays as main processment data types. Uses Double whenever applicable. homepage:            https://hackage.haskell.org/package/phonetic-languages-simplified-properties-array 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@@ -17,9 +17,9 @@ cabal-version:       >=1.10  library-  exposed-modules:     Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2, Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2, Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2Common, Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG201, Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2H, Phonetic.Languages.Array.Ukrainian.PropertiesSyllablesG2Hprime, Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2Common, Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2Rhythmicity, Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG2Diverse, Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG21, Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG22, Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG23, Phonetic.Languages.Array.Ukrainian.PropertiesFuncRepG24, Phonetic.Languages.Emphasis+  exposed-modules:     Phladiprelio.Ukrainian.PropertiesFuncRepG2, Phladiprelio.Ukrainian.PropertiesSyllablesG2, Phladiprelio.Ukrainian.PropertiesSyllablesG2Common, Phladiprelio.Ukrainian.PropertiesSyllablesG201, Phladiprelio.Ukrainian.PropertiesSyllablesG2H, Phladiprelio.Ukrainian.PropertiesSyllablesG2Hprime, Phladiprelio.Ukrainian.PropertiesFuncRepG2Common, Phladiprelio.Ukrainian.PropertiesFuncRepG2Rhythmicity, Phladiprelio.Ukrainian.PropertiesFuncRepG2Diverse, Phladiprelio.Ukrainian.PropertiesFuncRepG24, Phladiprelio.Ukrainian.Emphasis   -- other-modules:-  other-extensions:    BangPatterns, CPP, MultiWayIf-  build-depends:       base >=4.8 && <5, phonetic-languages-rhythmicity ==0.9.2.0, phonetic-languages-simplified-base ==0.6.1.0, ukrainian-phonetics-basic-array ==0.6.0.0, phonetic-languages-basis ==0.2.0.0, phonetic-languages-simplified-properties-array-common ==0.3.0.0, mmsyn2-array == 0.3.0.0, lists-flines ==0.1.2.0+  other-extensions:    BangPatterns, MultiWayIf, NoImplicitPrelude+  build-depends:       base >=4.13 && <5, phonetic-languages-rhythmicity ==0.11.0.2, phladiprelio-rhythmicity-shared ==0.1.0.0, phonetic-languages-simplified-base ==0.7.0.0, ukrainian-phonetics-basic-array ==0.7.0.0, phonetic-languages-basis ==0.3.0.0, phonetic-languages-simplified-properties-array-common ==0.4.1.0, mmsyn2-array == 0.3.1.1, lists-flines ==0.1.3.0, logical-constraints == 0.1.3.0   -- hs-source-dirs:   default-language:    Haskell2010