Copyright | (C) 2017 Jiri Marsicek |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Jiri Marsicek <jiri.marsicek@gmail.com> |
Safe Haskell | None |
Language | Haskell2010 |
This module provides functionality for converting Package
s to FlatPackage
s.
- data FlatPackage = FlatPackage {
- _fpAtom :: Atom
- _fpUseflags :: Set Use
- _fpKeywords :: Set Keyword
- _fpLicenses :: Set License
- mergeLists :: Ord a => [a] -> [a] -> [a]
- merge :: (Ord a, Semigroup a, Eq b) => (a -> b) -> Set a -> Set a -> Set a
- mergePackages :: Set FlatPackage -> Set FlatPackage -> Set FlatPackage
- flattenPackage :: Set Use -> Package -> FlatPackage
- flatten :: Set Use -> Package -> Set FlatPackage
- flattenPackages :: Set Use -> [Package] -> Set FlatPackage
- flattenSet :: PackageSet -> Set FlatPackage
Documentation
data FlatPackage Source #
Flat representation of Package
without nested dependencies.
FlatPackage | |
|
mergeLists :: Ord a => [a] -> [a] -> [a] Source #
Merges two lists together, if both lists are sorted in ascending order, the result will be also sorted in ascending order.
merge :: (Ord a, Semigroup a, Eq b) => (a -> b) -> Set a -> Set a -> Set a Source #
Merges two sets together, performing sconcat
on elements that are determined to be equal by result
of a function given in argument.
mergePackages :: Set FlatPackage -> Set FlatPackage -> Set FlatPackage Source #
Performs merge
of two sets of FlatPackage
s where equality is determined by Atom
.
See merge
.
flattenPackage :: Set Use -> Package -> FlatPackage Source #
Converts a Package
to a FlatPackage
with globals Use
flags applied.
Package Use
flags take precedence before globals Use
flags.
flattenPackages :: Set Use -> [Package] -> Set FlatPackage Source #
Convert a list of Package
s to a list of FlatPackages
with set Use
flags applied.
See flatten
for details on how a single Package
is converted to a list of FlatPackage
s.
flattenSet :: PackageSet -> Set FlatPackage Source #
Converts a PackageSet
to a list of FlatPackage
s.
See flattenPackages
for details on how list of Package
s is converted to a list of FlatPackage
s.