packages feed

phonetic-languages-phonetics-basics 0.2.0.0 → 0.2.1.0

raw patch · 4 files changed

+24/−5 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -8,3 +8,7 @@  * Second version. Added some optimizations for the Data.Phonetic.Languages.Base module functions. Added new functions to the module.++## 0.2.1.0 -- 2021-04-20++* Second version revised A. Fixed issues with being not compiled for GHC versions less than 8.2. 
Data/Phonetic/Languages/Base.hs view
@@ -1,6 +1,7 @@ {-# OPTIONS_HADDOCK show-extensions #-} {-# OPTIONS_GHC -funbox-strict-fields #-} {-# LANGUAGE BangPatterns #-}+{-# LANGUAGE CPP #-} {-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE MagicHash #-} @@ -234,10 +235,24 @@   -> Array Int PhoneticsRepresentationPLX   -> Maybe PhoneticsRepresentationPLX findSA repr arr = gBF3 (# i#, k #) (# j#, m #) repr arr -     where (!(I# i#),!(I# j#)) = bounds arr+     where !(I# i#,I# j#) = bounds arr            !k = unsafeAt arr (I# i#)            !m = unsafeAt arr (I# i#) +{-| The following is taken from the 'Data.Either' module from @base@ package.+-}+#ifdef __GLASGOW_HASKELL__+#if __GLASGOW_HASKELL__<802+fromLeft :: a -> Either a b -> a+fromLeft _ (Left x) = x+fromLeft def _ = def++fromRight :: b -> Either a b -> b+fromRight _ (Right x) = x+fromRight def _ = def+#endif+#endif+ findSAI   :: PhoneticRepresentationXInter   -> (String, String)@@ -246,7 +261,7 @@ findSAI repr (xs,ys) arr  | isLeft repr = gBF3 (# i#, k #) (# j#, m #) (fromX2PRPL . fromLeft (PREmptyC " " ' ') $ repr) arr  | otherwise = gBF3 (# i#, k #) (# j#, m #) (str2PRPL (fromRight [] repr) (xs,ys)) arr-     where (!(I# i#),!(I# j#)) = bounds arr+     where !(I# i#,I# j#) = bounds arr            !k = unsafeAt arr (I# i#)            !m = unsafeAt arr (I# i#)            str2PRPL :: String -> (String,String) -> PhoneticsRepresentationPL
Data/Phonetic/Languages/Undefined.hs view
@@ -11,7 +11,7 @@ -- The functions themselves are 'undefined' but with some type. They are just templates and some general idea. -- Please, provide your own implementation instead of using these ones. -module Data.Phonetic.Languages.Undefined {-# WARNING "This module contains just some templates and ideas. Please, provide the analogous functions by yourself, these ones while used returns 'undefined'. " #-} (+module Data.Phonetic.Languages.Undefined {-# WARNING "This module contains just some templates and ideas. Please, provide the analogous functions by yourself, these ones while used return 'undefined'. " #-} (   -- * Convert to the 'PhoneticsRepresentationPL'.   stringToPRPL   -- * Apply conversion from 'PhoneticsRepresentationPL'.
phonetic-languages-phonetics-basics.cabal view
@@ -3,7 +3,7 @@ -- http://haskell.org/cabal/users-guide/  name:                phonetic-languages-phonetics-basics-version:             0.2.0.0+version:             0.2.1.0 synopsis:            A library for working with generalized phonetic languages usage. description:         There already exists a Ukrainian implementation for the phonetic languages approach published at: https://hackage.haskell.org/package/phonetic-languages-simplified-examples-array. It is optimized for the Ukrainian only and needs to be rewritten for every new language mostly from scratch using it as a template. To avoid this boilerplate, this one is provided. It can be used for different languages and even for music or other fields.  homepage:            https://hackage.haskell.org/package/phonetic-languages-phonetics-basics@@ -20,7 +20,7 @@ library   exposed-modules:     Data.Phonetic.Languages.Undefined, Data.Phonetic.Languages.Base   -- other-modules:-  other-extensions:    BangPatterns, UnboxedTuples, MagicHash+  other-extensions:    CPP, BangPatterns, UnboxedTuples, MagicHash   ghc-options:         -funbox-strict-fields   build-depends:       base >=4.8 && <4.15   -- hs-source-dirs: