packages feed

phonetic-languages-simplified-properties-array-0.15.0.0: Phonetic/Languages/Array/Ukrainian/PropertiesSyllablesG2Common.hs

{-# 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 #-}