| Maintainer | Toshio Ito <debug.ito@gmail.com> | 
|---|---|
| Safe Haskell | None | 
| Language | Haskell2010 | 
Staversion.Internal.Aggregate
Description
This is an internal module. End-users should not use it.
- aggregateResults :: Aggregator -> [Result] -> ([AggregatedResult], [LogEntry])
 - type Aggregator = NonEmpty Version -> VersionRange
 - data VersionRange :: *
 - showVersionRange :: VersionRange -> String
 - aggOr :: Aggregator
 - aggPvpMajor :: Aggregator
 - aggPvpMinor :: Aggregator
 - groupAllPreservingOrderBy :: (a -> a -> Bool) -> [a] -> [NonEmpty a]
 - aggregatePackageVersions :: Aggregator -> NonEmpty (String, [(PackageName, Maybe Version)]) -> (Maybe [(PackageName, Maybe VersionRange)], [LogEntry])
 
Top-level function
aggregateResults :: Aggregator -> [Result] -> ([AggregatedResult], [LogEntry]) Source #
Aggregate Results with the given Aggregator. It first groups
 Results based on its resultFor field, and then each group is
 aggregated into an AggregatedResult.
If it fails, it returns an empty list of AggregatedResult. It
 also returns a list of LogEntrys to report warnings and errors.
Aggregators
type Aggregator = NonEmpty Version -> VersionRange Source #
Aggregate some Versions into a VersionRange.
data VersionRange :: * #
showVersionRange :: VersionRange -> String Source #
Let Cabal convert VersionRange to String
aggOr :: Aggregator Source #
Aggregator of ORed versions.
aggPvpMajor :: Aggregator Source #
Aggregate versions to the range that the versions cover in a PVP sense. This aggregator sets the upper bound to a major version, which means it assumes major-version bump is not backward-compatible.
aggPvpMinor :: Aggregator Source #
Aggregate versions to the range that versions cover in a PVP sense. This aggregator sets the upper bound to a minor version, which means it assumes minor-version bump is not backward-compatible.
Utility
Low-level functions
aggregatePackageVersions Source #
Arguments
| :: Aggregator | |
| -> NonEmpty (String, [(PackageName, Maybe Version)]) | (  | 
| -> (Maybe [(PackageName, Maybe VersionRange)], [LogEntry]) | 
Aggregate one or more maps between PackageName and Version.
The input Maybe Versions should all be Just. Nothing version
 is warned and ignored. If the input versions are all Nothing, the
 result version range is Nothing.
The PackageName lists in the input must be consistent (i.e. they
 all must be the same list.) If not, it returns Nothing map and an
 error is logged.