uniqueness-periods-vector-properties 0.2.0.0 → 0.3.0.0
raw patch · 3 files changed
+22/−3 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Languages.UniquenessPeriods.Vector.Properties: justOneValue2Property :: Ord b => b -> [b]
+ Languages.UniquenessPeriods.Vector.Properties: oneProperty :: Ord b => [b] -> b
Files
- ChangeLog.md +4/−0
- Languages/UniquenessPeriods/Vector/Properties.hs +15/−0
- uniqueness-periods-vector-properties.cabal +3/−3
ChangeLog.md view
@@ -16,3 +16,7 @@ * Second version. Added new functions diverse1, diverse1s, diverse2 to the module. Changed the dependency boundaries for uniqueness-periods-vector. Some minor documentation improvements.++## 0.3.0.0 -- 2020-09-09++* Third version. Added new functions oneProperty and justOneValue2Property to the module. Some minor code improvements.
Languages/UniquenessPeriods/Vector/Properties.hs view
@@ -98,3 +98,18 @@ diverse2 v | V.null v = 0 | otherwise = V.sum . V.map (sum . fst) $ v+{-# INLINE diverse2 #-} ++-- | Is intended to be used in the 'V.Vector' @([b] -> b)@ where just the first value in the list is used. The simplest case among all possible ones. For an empty +-- list returns 'error' with an informative message. +oneProperty :: Ord b => [b] -> b+oneProperty xs + | null xs = error "Languages.UniquenessPeriods.Vector.Properties.oneProperty: empty list. "+ | otherwise = head xs+{-# INLINE oneProperty #-} ++-- | Converts just one value to the needed list to be used as a \"property\". Is provided here for explanation purposes (just as a meaningful alias). Therefore, it is+-- an auxiliary function. +justOneValue2Property :: Ord b => b -> [b]+justOneValue2Property = (:[])+{-# INLINE justOneValue2Property #-}
uniqueness-periods-vector-properties.cabal view
@@ -3,9 +3,9 @@ -- http://haskell.org/cabal/users-guide/ name: uniqueness-periods-vector-properties-version: 0.2.0.0-synopsis: Metrics for the maximum element for the uniqueness-periods-vector packages family.-description: Metrics for the maximum element for the uniqueness-periods-vector packages family. Generalization of the DobutokO.Poetry.Norms and DobutokO.Poetry.Norms.Extended modules from dobuotokO-poetry package.+version: 0.3.0.0+synopsis: Metrices for the maximum element for the uniqueness-periods-vector packages family.+description: Metrices for the maximum element for the uniqueness-periods-vector packages family. Generalization of the DobutokO.Poetry.Norms and DobutokO.Poetry.Norms.Extended modules from dobuotokO-poetry package. homepage: https://hackage.haskell.org/package/uniqueness-periods-vector-properties license: MIT license-file: LICENSE