phonetic-languages-permutations-array 0.3.4.0 → 0.5.0.0
raw patch · 12 files changed
Files
- CHANGELOG.md +10/−0
- LICENSE +1/−1
- Phladiprelio/PermutationsArr.hs +63/−0
- Phladiprelio/PermutationsArrMini.hs +82/−0
- Phladiprelio/PermutationsArrMini1.hs +95/−0
- Phladiprelio/PermutationsRepresent.hs +29/−0
- Phonetic/Languages/Permutations/Arr.hs +0/−55
- Phonetic/Languages/Permutations/ArrMini.hs +0/−67
- Phonetic/Languages/Permutations/ArrMini1.hs +0/−79
- Phonetic/Languages/Permutations/Represent.hs +0/−26
- README.md +22/−0
- phonetic-languages-permutations-array.cabal +7/−6
CHANGELOG.md view
@@ -35,3 +35,13 @@ ## 0.3.4.0 -- 2022-03-24 * Third version revised E. Updated the dependency boundaries to support the latest GHC and Cabal.++## 0.4.0.0 -- 2023-01-30++* Fourth version. Switched to NoImplicitPrelude extension. Some minor code improvements. +Changed the names of the modules. Updated the dependencies boundaries.++## 0.5.0.0 -- 2024-01-23++* Fifth version. Switched to using more general function signatures with specializing. Added devotion. Some minor code improvements. Added README.md file. Switched to better dependency of monoid-insertleft.+
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2020-2022 OleksandrZhabenko+Copyright (c) 2020-2023 OleksandrZhabenko Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
+ Phladiprelio/PermutationsArr.hs view
@@ -0,0 +1,63 @@+{-# LANGUAGE NoImplicitPrelude #-}++-- |+-- Module : Phladiprelio.PermutationsArr+-- Copyright : (c) OleksandrZhabenko 2020-2024+-- License : MIT+-- Stability : Experimental+-- Maintainer : oleksandr.zhabenko@yahoo.com+--+-- Permutations and universal set functions for the phonetic-languages series and phladiprelio of packages+-- (PhLADiPreLiO-related). This module uses no vectors, but instead uses arrays.++module Phladiprelio.PermutationsArr (+ universalSetGL+ , genPermutations+ , genPermutationsArr+ , genPermutationsL+ , genPermutationsArrL+) where++import GHC.Enum+import GHC.List+import GHC.Num (Num,(*), (-))+import GHC.Base+import GHC.Arr+import qualified Data.List as L (permutations,product)+import Data.InsertLeft+import qualified Data.Foldable as F (Foldable,concat,foldr',foldl')+import Data.Monoid++-- | A key point of the evaluation -- the universal set of the task represented as a @[[a]]@.+universalSetGL ::+ (Eq a, F.Foldable t, InsertLeft t a, Monoid (t a), Monoid (t (t a))) => t a+ -> t (t a)+ -> (t a -> [a]) -- ^ The function that is used internally to convert to the @[a]@ so that the function can process further the permutations+ -> ((t (t a)) -> [[a]]) -- ^ The function that is used internally to convert to the needed representation so that the function can process further+ -> [Array Int Int] -- ^ The list of permutations of 'Int' indices starting from 0 and up to n (n is probably less than 7).+ -> Array Int [a]+ -> [[a]]+universalSetGL ts uss f1 f2 permsL baseArr = map (F.concat . F.foldr' (:) [] . (f1 ts:) . (`mappend` f2 uss) . elems . amap (unsafeAt baseArr)) permsL+{-# INLINE universalSetGL #-}+{-# SPECIALIZE universalSetGL :: String -> [String] -> (String -> String) -> ([String] -> [String]) -> [Array Int Int] -> Array Int String -> [String] #-}++genPermutations :: (Ord a, Enum a, Num a) => Int -> Array Int [a]+genPermutations n = listArray (0,L.product [1..(n - 1)]) . L.permutations . take n $ [0..]+{-# INLINE genPermutations #-}+{-# SPECIALIZE genPermutations :: Int -> Array Int [Int] #-}++genPermutationsArr :: (Ord a, Enum a, Num a) => Array Int (Array Int [a])+genPermutationsArr = amap genPermutations . listArray (0,5) $ [2..7]+{-# INLINE genPermutationsArr #-}+{-# SPECIALIZE genPermutationsArr :: Array Int (Array Int [Int]) #-}++genPermutationsL :: (Ord a, Enum a, Num a) => Int -> [Array Int a]+genPermutationsL n = map (\xs -> listArray (0,n - 1) xs) . L.permutations . take n $ [0..]+{-# INLINE genPermutationsL #-}+{-# SPECIALIZE genPermutationsL :: Int -> [Array Int Int] #-}++genPermutationsArrL :: (Ord a, Enum a, Num a) => Array Int [Array Int a]+genPermutationsArrL = amap genPermutationsL . listArray (0,5) $ [2..7]+{-# INLINE genPermutationsArrL #-}+{-# SPECIALIZE genPermutationsArrL :: Array Int [Array Int Int] #-}+
+ Phladiprelio/PermutationsArrMini.hs view
@@ -0,0 +1,82 @@+{-# LANGUAGE NoImplicitPrelude #-}++-- |+-- Module : Phladiprelio.PermutationsArrMini+-- Copyright : (c) OleksandrZhabenko 2021-2024+-- License : MIT+-- Stability : Experimental+-- Maintainer : oleksandr.zhabenko@yahoo.com+--+-- Special permutations functions for the phonetic-languages and phladiprelio series of packages. This+-- module uses no vectors, but instead uses arrays.++module Phladiprelio.PermutationsArrMini (+ genPairwisePermutations+ , pairsSwapP+ , genPairwisePermutationsArrN+ , genPairwisePermutationsArr+ , genPairwisePermutationsLN+ , genPairwisePermutationsL+ , genPairwisePermutationsArrLN+ , genPairwisePermutationsArrL+) where++import GHC.Enum+import Data.Bits (shiftR)+import GHC.Base+import GHC.Num+import GHC.List+import GHC.Arr++genPairwisePermutations :: (Ord a, Enum a, Num a) => Int -> Array Int [a]+genPairwisePermutations n = listArray (0, shiftR (n*(n-1)) 1) . pairsSwapP . take n $ [0..]+{-# INLINE genPairwisePermutations #-}+{-# SPECIALIZE genPairwisePermutations :: Int -> Array Int [Int] #-}++pairsSwapP :: (Ord a, Enum a, Num a) => [a] -> [[a]]+pairsSwapP xs = xs:[swap2Ls k m xs | k <- xs, m <- xs , k < m]+{-# SPECIALIZE pairsSwapP :: [Int] -> [[Int]] #-}++-- | The first two arguments are considered not equal, though it is not checked.+swap2ns :: (Eq a) => a -> a -> a -> a+swap2ns k m n+ | n /= k = if n /= m then n else k+ | otherwise = m+{-# INLINE swap2ns #-}+{-# SPECIALIZE swap2ns :: Int -> Int -> Int -> Int #-}++swap2Ls :: (Eq a) => a -> a -> [a] -> [a]+swap2Ls k m = map (swap2ns k m)+{-# INLINE swap2Ls #-}+{-# SPECIALIZE swap2Ls :: Int -> Int -> [Int] -> [Int] #-}++genPairwisePermutationsArrN :: (Ord a, Enum a, Num a) => Int -> Array Int (Array Int [a])+genPairwisePermutationsArrN n = amap genPairwisePermutations . listArray (0,n - 2) $ [2..n]+{-# INLINE genPairwisePermutationsArrN #-}+{-# SPECIALIZE genPairwisePermutationsArrN :: Int -> Array Int (Array Int [Int]) #-}++genPairwisePermutationsArr :: (Ord a, Enum a, Num a) => Array Int (Array Int [a])+genPairwisePermutationsArr = genPairwisePermutationsArrN 10+{-# INLINE genPairwisePermutationsArr #-}+{-# SPECIALIZE genPairwisePermutationsArr :: Array Int (Array Int [Int]) #-}++genPairwisePermutationsLN :: (Ord a, Enum a, Num a) => Int -> [Array Int a]+genPairwisePermutationsLN n = map (\xs -> listArray (0,n - 1) xs) . pairsSwapP . take n $ [0..]+{-# INLINE genPairwisePermutationsLN #-}+{-# SPECIALIZE genPairwisePermutationsLN :: Int -> [Array Int Int] #-}++genPairwisePermutationsL :: (Ord a, Enum a, Num a) => [Array Int a]+genPairwisePermutationsL = genPairwisePermutationsLN 10+{-# INLINE genPairwisePermutationsL #-}+{-# SPECIALIZE genPairwisePermutationsL :: [Array Int Int] #-}++genPairwisePermutationsArrLN :: (Ord a, Enum a, Num a) => Int -> Array Int [Array Int a]+genPairwisePermutationsArrLN n = amap genPairwisePermutationsLN . listArray (0,n - 2) $ [2..n]+{-# INLINE genPairwisePermutationsArrLN #-}+{-# SPECIALIZE genPairwisePermutationsArrLN :: Int -> Array Int [Array Int Int] #-}++genPairwisePermutationsArrL :: (Ord a, Enum a, Num a) => Array Int [Array Int a]+genPairwisePermutationsArrL = genPairwisePermutationsArrLN 10+{-# INLINE genPairwisePermutationsArrL #-}+{-# SPECIALIZE genPairwisePermutationsArrL :: Array Int [Array Int Int] #-}+
+ Phladiprelio/PermutationsArrMini1.hs view
@@ -0,0 +1,95 @@+{-# LANGUAGE MultiWayIf #-}+{-# LANGUAGE NoImplicitPrelude #-}+++-- |+-- Module : Phladiprelio.PermutationsArrMini1+-- Copyright : (c) OleksandrZhabenko 2022-2024+-- License : MIT+-- Stability : Experimental+-- Maintainer : oleksandr.zhabenko@yahoo.com+--+-- Special permutations functions for the phonetic-languages and phladiprelio series of packages. This+-- module uses no vectors, but instead uses arrays.++module Phladiprelio.PermutationsArrMini1 (+ genElementaryPermutations1+ , pairsSwapP1+ , genElementaryPermutationsArrN1+ , genElementaryPermutationsArr1+ , genElementaryPermutationsLN1+ , genElementaryPermutationsL1+ , genElementaryPermutationsArrLN1+ , genElementaryPermutationsArrL1+) where++import GHC.Base+import GHC.Arr+import GHC.List+import GHC.Num (Num,(-), (+), abs)+import GHC.Enum++genElementaryPermutations1 :: (Ord a, Enum a, Num a) => Int -> Array Int [a]+genElementaryPermutations1 n = listArray (0,l-1) xs+ where xs = pairsSwapP1 . take n $ [0..]+ l = length xs+{-# INLINE genElementaryPermutations1 #-}+{-# SPECIALIZE genElementaryPermutations1 :: Int -> Array Int [Int] #-}++pairsSwapP1 :: (Ord a, Num a) => [a] -> [[a]]+pairsSwapP1 xs = xs:[swap2Ls1 k m xs | k <- xs, m <- xs , abs (k - m) > 1] `mappend` [swap2Ls1 k (k - 1) xs | k <- drop 1 xs ]+{-# SPECIALIZE pairsSwapP1 :: [Int] -> [[Int]] #-}++-- | The first two arguments are considered not equal and all three of the arguments are considered greater or equal to 0, though it is not checked.+swap2ns1 :: (Ord a, Num a) => a -> a -> a -> a+swap2ns1 k n m+ | n > k =+ if+ | m < k -> m+ | m > n -> m+ | m < n -> m + 1+ | otherwise -> k+ | otherwise =+ if+ | m > k -> m+ | m < n -> m+ | m > n -> m - 1+ | otherwise -> k+{-# INLINE swap2ns1 #-}+{-# SPECIALIZE swap2ns1 :: Int -> Int -> Int -> Int #-}++swap2Ls1 :: (Ord a, Num a) => a -> a -> [a] -> [a]+swap2Ls1 k m = map (swap2ns1 k m)+{-# INLINE swap2Ls1 #-}+{-# SPECIALIZE swap2Ls1 :: Int -> Int -> [Int] -> [Int] #-}++genElementaryPermutationsArrN1 :: (Ord a, Enum a, Num a) => Int -> Array Int (Array Int [a])+genElementaryPermutationsArrN1 n = amap genElementaryPermutations1 . listArray (0,n - 2) $ [2..n]+{-# INLINE genElementaryPermutationsArrN1 #-}+{-# SPECIALIZE genElementaryPermutationsArrN1 :: Int -> Array Int (Array Int [Int]) #-}++genElementaryPermutationsArr1 :: (Ord a, Enum a, Num a) => Array Int (Array Int [a])+genElementaryPermutationsArr1 = genElementaryPermutationsArrN1 10+{-# INLINE genElementaryPermutationsArr1 #-}+{-# SPECIALIZE genElementaryPermutationsArr1 :: Array Int (Array Int [Int]) #-}++genElementaryPermutationsLN1 :: (Ord a, Enum a, Num a) => Int -> [Array Int a]+genElementaryPermutationsLN1 n = map (\xs -> listArray (0,n - 1) xs) . pairsSwapP1 . take n $ [0..]+{-# INLINE genElementaryPermutationsLN1 #-}+{-# SPECIALIZE genElementaryPermutationsLN1 :: Int -> [Array Int Int] #-}++genElementaryPermutationsL1 :: (Ord a, Enum a, Num a) => [Array Int a]+genElementaryPermutationsL1 = genElementaryPermutationsLN1 10+{-# INLINE genElementaryPermutationsL1 #-}+{-# SPECIALIZE genElementaryPermutationsL1 :: [Array Int Int] #-}++genElementaryPermutationsArrLN1 :: (Ord a, Enum a, Num a) => Int -> Array Int [Array Int a]+genElementaryPermutationsArrLN1 n = amap genElementaryPermutationsLN1 . listArray (0,n - 2) $ [2..n]+{-# INLINE genElementaryPermutationsArrLN1 #-}+{-# SPECIALIZE genElementaryPermutationsArrLN1 :: Int -> Array Int [Array Int Int] #-}++genElementaryPermutationsArrL1 :: (Ord a, Enum a, Num a) => Array Int [Array Int a]+genElementaryPermutationsArrL1 = genElementaryPermutationsArrLN1 10+{-# INLINE genElementaryPermutationsArrL1 #-}+{-# SPECIALIZE genElementaryPermutationsArrL1 :: Array Int [Array Int Int] #-}+
+ Phladiprelio/PermutationsRepresent.hs view
@@ -0,0 +1,29 @@+{-# LANGUAGE NoImplicitPrelude #-}++-- |+-- Module : Phladiprelio.PermutationsRepresent+-- Copyright : (c) OleksandrZhabenko 2022-2023+-- License : MIT+-- Stability : Experimental+-- Maintainer : oleksandr.zhabenko@yahoo.com+--+-- Permutations data type to mark the needed permutations type from the other modules.++module Phladiprelio.PermutationsRepresent (+ PermutationsType(..)+ , bTransform2Perms+) where++import GHC.Base+import Text.Show++data PermutationsType = P Int deriving (Eq, Ord)++instance Show PermutationsType where+ show (P x) = "+p " `mappend` show x++bTransform2Perms :: [String] -> PermutationsType+bTransform2Perms ys+ | ys == ["1"] = P 1+ | ys == ["2"] = P 2+ | otherwise = P 0
− Phonetic/Languages/Permutations/Arr.hs
@@ -1,55 +0,0 @@--- |--- Module : Phonetic.Languages.Permutations.Arr--- Copyright : (c) OleksandrZhabenko 2020-2021--- License : MIT--- Stability : Experimental--- Maintainer : olexandr543@yahoo.com------ Permutations and universal set functions for the phonetic-languages series of packages. This--- module uses no vectors, but instead uses arrays.--module Phonetic.Languages.Permutations.Arr (- universalSetGL- , genPermutations- , genPermutationsArr- , genPermutationsL- , genPermutationsArrL-) where--import GHC.Arr-import qualified Data.List as L (permutations)-import Data.SubG-import qualified Data.Foldable as F (concat,foldr',foldl')-import Data.Monoid---- | A key point of the evaluation -- the universal set of the task represented as a @[[a]]@.-universalSetGL ::- (Eq a, Foldable t, InsertLeft t a, Monoid (t a), Monoid (t (t a))) => t a- -> t (t a)- -> (t a -> [a]) -- ^ The function that is used internally to convert to the @[a]@ so that the function can process further the permutations- -> ((t (t a)) -> [[a]]) -- ^ The function that is used internally to convert to the needed representation so that the function can process further- -> [Array Int Int] -- ^ The list of permutations of 'Int' indices starting from 0 and up to n (n is probably less than 7).- -> Array Int [a]- -> [[a]]-universalSetGL ts uss f1 f2 permsL baseArr = map (F.concat . F.foldr' (:) [] . (f1 ts:) . (`mappend` f2 uss) . elems . amap (unsafeAt baseArr)) permsL-{-# INLINE universalSetGL #-}---- | One of the popular examples: realization of the factorial function using 'F.foldl''. Is taken from some--- teaching material.-factorial n = F.foldl' (*) 1 [1..n]--genPermutations :: Int -> Array Int [Int]-genPermutations n = listArray (0,factorial n - 1) . L.permutations . take n $ [0..]-{-# INLINE genPermutations #-}--genPermutationsArr :: Array Int (Array Int [Int])-genPermutationsArr = amap genPermutations . listArray (0,5) $ [2..7]-{-# INLINE genPermutationsArr #-}--genPermutationsL :: Int -> [Array Int Int]-genPermutationsL n = map (\xs -> listArray (0,n - 1) xs) . L.permutations . take n $ [0..]-{-# INLINE genPermutationsL #-}--genPermutationsArrL :: Array Int [Array Int Int]-genPermutationsArrL = amap genPermutationsL . listArray (0,5) $ [2..7]-{-# INLINE genPermutationsArrL #-}
− Phonetic/Languages/Permutations/ArrMini.hs
@@ -1,67 +0,0 @@--- |--- Module : Phonetic.Languages.Permutations.ArrMini--- Copyright : (c) OleksandrZhabenko 2021--- License : MIT--- Stability : Experimental--- Maintainer : olexandr543@yahoo.com------ Special permutations functions for the phonetic-languages series of packages. This--- module uses no vectors, but instead uses arrays.--module Phonetic.Languages.Permutations.ArrMini (- genPairwisePermutations- , pairsSwapP- , genPairwisePermutationsArrN- , genPairwisePermutationsArr- , genPairwisePermutationsLN- , genPairwisePermutationsL- , genPairwisePermutationsArrLN- , genPairwisePermutationsArrL-) where--import GHC.Arr--genPairwisePermutations :: Int -> Array Int [Int]-genPairwisePermutations n = listArray (0,(n*(n-1)) `quot` 2) . pairsSwapP . take n $ [0..]-{-# INLINE genPairwisePermutations #-}--pairsSwapP :: [Int] -> [[Int]]-pairsSwapP xs = xs:[swap2Ls k m xs | k <- xs, m <- xs , k < m]-{-# INLINABLE pairsSwapP #-}---- | The first two arguments are considered not equal, though it is not checked.-swap2ns :: Int -> Int -> Int -> Int-swap2ns k m n- | n /= k = if n /= m then n else k- | otherwise = m-{-# INLINE swap2ns #-}--swap2Ls :: Int -> Int -> [Int] -> [Int]-swap2Ls k m = map (swap2ns k m)-{-# INLINE swap2Ls #-}--genPairwisePermutationsArrN :: Int -> Array Int (Array Int [Int])-genPairwisePermutationsArrN n = amap genPairwisePermutations . listArray (0,n - 2) $ [2..n]-{-# INLINE genPairwisePermutationsArrN #-}--genPairwisePermutationsArr :: Array Int (Array Int [Int])-genPairwisePermutationsArr = genPairwisePermutationsArrN 10-{-# INLINE genPairwisePermutationsArr #-}--genPairwisePermutationsLN :: Int -> [Array Int Int]-genPairwisePermutationsLN n = map (\xs -> listArray (0,n - 1) xs) . pairsSwapP . take n $ [0..]-{-# INLINE genPairwisePermutationsLN #-}--genPairwisePermutationsL :: [Array Int Int]-genPairwisePermutationsL = genPairwisePermutationsLN 10-{-# INLINE genPairwisePermutationsL #-}--genPairwisePermutationsArrLN :: Int -> Array Int [Array Int Int]-genPairwisePermutationsArrLN n = amap genPairwisePermutationsLN . listArray (0,n - 2) $ [2..n]-{-# INLINE genPairwisePermutationsArrLN #-}--genPairwisePermutationsArrL :: Array Int [Array Int Int]-genPairwisePermutationsArrL = genPairwisePermutationsArrLN 10-{-# INLINE genPairwisePermutationsArrL #-}--
− Phonetic/Languages/Permutations/ArrMini1.hs
@@ -1,79 +0,0 @@-{-# LANGUAGE MultiWayIf #-}---- |--- Module : Phonetic.Languages.Permutations.ArrMini1--- Copyright : (c) OleksandrZhabenko 2022--- License : MIT--- Stability : Experimental--- Maintainer : olexandr543@yahoo.com------ Special permutations functions for the phonetic-languages series of packages. This--- module uses no vectors, but instead uses arrays.--module Phonetic.Languages.Permutations.ArrMini1 (- genElementaryPermutations1- , pairsSwapP1- , genElementaryPermutationsArrN1- , genElementaryPermutationsArr1- , genElementaryPermutationsLN1- , genElementaryPermutationsL1- , genElementaryPermutationsArrLN1- , genElementaryPermutationsArrL1-) where--import GHC.Arr--genElementaryPermutations1 :: Int -> Array Int [Int]-genElementaryPermutations1 n = listArray (0,l-1) xs- where xs = pairsSwapP1 . take n $ [0..]- l = length xs-{-# INLINE genElementaryPermutations1 #-}--pairsSwapP1 :: [Int] -> [[Int]]-pairsSwapP1 xs = xs:[swap2Ls1 k m xs | k <- xs, m <- xs , abs (k - m) > 1] `mappend` [swap2Ls1 k (k - 1) xs | k <- drop 1 xs ]-{-# INLINABLE pairsSwapP1 #-}---- | The first two arguments are considered not equal and all three of the arguments are considered greater or equal to 0, though it is not checked.-swap2ns1 :: Int -> Int -> Int -> Int-swap2ns1 k n m- | n > k =- if- | m < k -> m- | m > n -> m- | m >= k && m < n -> m + 1- | otherwise -> k- | otherwise =- if- | m > k -> m- | m < n -> m- | m <= k && m > n -> m - 1- | otherwise -> k-{-# INLINE swap2ns1 #-}--swap2Ls1 :: Int -> Int -> [Int] -> [Int]-swap2Ls1 k m = map (swap2ns1 k m)-{-# INLINE swap2Ls1 #-}--genElementaryPermutationsArrN1 :: Int -> Array Int (Array Int [Int])-genElementaryPermutationsArrN1 n = amap genElementaryPermutations1 . listArray (0,n - 2) $ [2..n]-{-# INLINE genElementaryPermutationsArrN1 #-}--genElementaryPermutationsArr1 :: Array Int (Array Int [Int])-genElementaryPermutationsArr1 = genElementaryPermutationsArrN1 10-{-# INLINE genElementaryPermutationsArr1 #-}--genElementaryPermutationsLN1 :: Int -> [Array Int Int]-genElementaryPermutationsLN1 n = map (\xs -> listArray (0,n - 1) xs) . pairsSwapP1 . take n $ [0..]-{-# INLINE genElementaryPermutationsLN1 #-}--genElementaryPermutationsL1 :: [Array Int Int]-genElementaryPermutationsL1 = genElementaryPermutationsLN1 10-{-# INLINE genElementaryPermutationsL1 #-}--genElementaryPermutationsArrLN1 :: Int -> Array Int [Array Int Int]-genElementaryPermutationsArrLN1 n = amap genElementaryPermutationsLN1 . listArray (0,n - 2) $ [2..n]-{-# INLINE genElementaryPermutationsArrLN1 #-}--genElementaryPermutationsArrL1 :: Array Int [Array Int Int]-genElementaryPermutationsArrL1 = genElementaryPermutationsArrLN1 10-{-# INLINE genElementaryPermutationsArrL1 #-}
− Phonetic/Languages/Permutations/Represent.hs
@@ -1,26 +0,0 @@--- |--- Module : Phonetic.Languages.Permutations.Represent--- Copyright : (c) OleksandrZhabenko 2022--- License : MIT--- Stability : Experimental--- Maintainer : olexandr543@yahoo.com------ Permutations data type to mark the needed permutations type from the other modules.--module Phonetic.Languages.Permutations.Represent (- PermutationsType(..)- , bTransform2Perms-) where--import Data.Monoid--data PermutationsType = P Int deriving (Eq, Ord)--instance Show PermutationsType where- show (P x) = "+p " `mappend` show x--bTransform2Perms :: [String] -> PermutationsType-bTransform2Perms ys- | ys == ["1"] = P 1- | ys == ["2"] = P 2- | otherwise = P 0
+ README.md view
@@ -0,0 +1,22 @@+ Devotion+ ========++The author would like to devote this project to support the [Foundation Gastrostars](https://gastrostars.nl).++The foundation founder is [Emma Kok](https://www.emmakok.nl).++On the 06/01/2024 there is Sophie's Kok, a sister of Emma Kok, 19th Birthday (she is 18). Therefore, the version 0.5.0.0 is additionally devoted also to her. On the 22/01/2023 there is Day of Unity of Ukraine, and on the 23/01/2024 the Orthodox Christians have memory of St. Paulinus of Nola.++Besides, you can support Ukraine and Ukrainian people. ++All support is welcome, including donations for the needs of the Ukrainian army, IDPs and refugees.++If you would like to share some financial support with Gastrostars, please, contact the mentioned foundation+using the URL:++[Contact Foundation GASTROSTARS](https://gastrostars.nl/hou-mij-op-de-hoogte)++or ++[Donation Page](https://gastrostars.nl/doneren)+
phonetic-languages-permutations-array.cabal view
@@ -2,24 +2,25 @@ -- For further documentation, see http://haskell.org/cabal/users-guide/ name: phonetic-languages-permutations-array-version: 0.3.4.0+version: 0.5.0.0 synopsis: Permutations and universal set related functions for the phonetic-languages series description: Permutations-related to produce universal set of the task. Uses arrays instead of vectors. homepage: https://hackage.haskell.org/package/phonetic-languages-permutations-array+bug-reports: https://github.com/Oleksandr-Zhabenko/phonetic-languages-permutations-array/issues 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-extra-source-files: CHANGELOG.md+extra-source-files: CHANGELOG.md, README.md cabal-version: >=1.10 library- exposed-modules: Phonetic.Languages.Permutations.Arr, Phonetic.Languages.Permutations.ArrMini, Phonetic.Languages.Permutations.ArrMini1, Phonetic.Languages.Permutations.Represent+ exposed-modules: Phladiprelio.PermutationsArr, Phladiprelio.PermutationsArrMini, Phladiprelio.PermutationsArrMini1, Phladiprelio.PermutationsRepresent -- other-modules:- other-extensions: MultiWayIf- build-depends: base >=4.8 && <5, subG ==0.5.3.0+ other-extensions: MultiWayIf, NoImplicitPrelude+ build-depends: base >=4.13 && <5, monoid-insertleft ==0.1.0.1 -- hs-source-dirs: default-language: Haskell2010