packages feed

aftovolio 0.7.0.0 → 0.7.1.0

raw patch · 4 files changed

+49/−44 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -56,3 +56,7 @@  * Seventh version. Added new command line argument group +nm ... -nm and changed the arity of the main functions. These arguments are the line numbers of the sorted Aftovolio data to be displayed in the modes except tests and file appending. +## 0.7.1.0 -- 2025-02-24++* Seventh version revised A. Changed the name of the one of the Main.hs files so that to avoid duplications on Stackage. Added possibility to filter out the music information in the text in the music mode using "-m" command line argument for unconcatUkr executable.+
− Main.hs
@@ -1,42 +0,0 @@--- |--- Module      :  Main--- Copyright   :  (c) OleksandrZhabenko 2021-2024--- License     :  MIT--- Stability   :  Experimental--- Maintainer  :  oleksandr.zhabenko@yahoo.com--------{-# OPTIONS_GHC -threaded -rtsopts #-}-{-# OPTIONS_HADDOCK -show-extensions #-}-{-# LANGUAGE NoImplicitPrelude #-}--{-# LANGUAGE BangPatterns #-}--module Main where--import GHC.Base-import Aftovolio.Ukrainian.ReverseConcatenations-import System.Environment (getArgs)-import Text.Read (readMaybe)-import Data.Maybe (fromMaybe)-import System.IO-import GHC.List---main :: IO ()-main = do-  args0 <- getArgs-  let !fstA = fromMaybe 1 (readMaybe (mconcat . take 1 $ args0)::Maybe Int)-      !args-        | fstA == 1 = filter (/= "-i") args0-        | otherwise = filter (/= "-i") . drop 1 $ args0-      !stdinput = any (== "-i") args0 -- If you specify \"-i\" then reads the input text from the stdin otherwise from the file specified instead.-  if stdinput then do-     contents <- getContents-     putStrLn . reverseConcatenations fstA $ contents-  else do-     let !file = concat . take 1 $ args-         !toFile = concat . drop 1 . take 2 $ args-     if null file then putStrLn "No file to read the Ukrainian text is specified. "-     else readFile file >>= return . reverseConcatenations fstA >>= (\ts -> if null toFile then putStrLn ts else writeFile toFile ts)
+ UnconcatUkr.hs view
@@ -0,0 +1,43 @@+-- |+-- Module      :  Main+-- Copyright   :  (c) OleksandrZhabenko 2021-2025+-- License     :  MIT+-- Stability   :  Experimental+-- Maintainer  :  oleksandr.zhabenko@yahoo.com+--+--++{-# OPTIONS_GHC -threaded -rtsopts #-}+{-# OPTIONS_HADDOCK -show-extensions #-}+{-# LANGUAGE NoImplicitPrelude #-}++{-# LANGUAGE BangPatterns #-}++module Main where++import GHC.Base+import Aftovolio.Ukrainian.ReverseConcatenations+import System.Environment (getArgs)+import Text.Read (readMaybe)+import Data.Maybe (fromMaybe)+import System.IO+import GHC.List+import Data.Char (isDigit)++main :: IO ()+main = do+  args0 <- getArgs+  let !fstA = fromMaybe 1 (readMaybe (mconcat . take 1 $ args0)::Maybe Int)+      !args+        | fstA == 1 = filter (/= "-i") args0+        | otherwise = filter (/= "-i") . drop 1 $ args0+      !stdinput = any (== "-i") args0 -- If you specify \"-i\" then reads the input text from the stdin otherwise from the file specified instead.+      !filterMusicInformation = any (== "-m") args -- ^ If you specify as one of the command line arguments \"-m\" then the digits and symbols like \'=\' and \'_\' are filtered, so cleaning from the music information is done.+  if stdinput then do+     contents <- getContents+     putStrLn . reverseConcatenations fstA . (if filterMusicInformation then filter (\c -> (not . isDigit $ c) && c /= '=' && c /= '_') else id) $ contents+  else do+     let !file = concat . take 1 $ args+         !toFile = concat . drop 1 . take 2 $ args+     if null file then putStrLn "No file to read the Ukrainian text is specified. "+     else readFile file >>= return . reverseConcatenations fstA  . (if filterMusicInformation then filter (\c -> (not . isDigit $ c) && c /= '=' && c /= '_') else id) >>= (\ts -> if null toFile then putStrLn ts else writeFile toFile ts)
aftovolio.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               aftovolio-version:            0.7.0.0+version:            0.7.1.0  -- A short (one-line) description of the package. synopsis:           An AFTOVolio implementation for creating texts with special phonetic / prosodic properties.@@ -45,7 +45,7 @@     default-language: Haskell2010  executable unconcatUkr2-  main-is:             Main.hs+  main-is:             UnconcatUkr.hs   other-modules:       Aftovolio.Ukrainian.ReverseConcatenations   other-extensions:    BangPatterns, NoImplicitPrelude, StrictData   build-depends:       base >=4.13 && <5, mmsyn2-array ==0.3.1.1, intermediate-structures == 0.1.2.0