Safe Haskell | None |
---|---|
Language | Haskell2010 |
Convert between cabal and debian package names based on version number ranges.
- newtype DebBase = DebBase {}
- data VersionSplits = VersionSplits {
- oldestPackage :: DebBase
- splits :: [(Version, DebBase)]
- makePackage :: DebBase -> VersionSplits
- insertSplit :: Version -> DebBase -> VersionSplits -> VersionSplits
- cabalFromDebian :: Map PackageName VersionSplits -> DebBase -> DebianVersion -> PackageName
- cabalFromDebian' :: Map PackageName VersionSplits -> DebBase -> Version -> PackageIdentifier
- debianFromCabal :: VersionSplits -> PackageIdentifier -> DebBase
- packageRangesFromVersionSplits :: VersionSplits -> [(DebBase, VersionRange)]
- doSplits :: VersionSplits -> Maybe VersionReq -> DebBase
Documentation
The base of a debian binary package name, the string that appears between "libghc-" and "-dev".
Combinators for VersionSplits
data VersionSplits Source #
Describes a mapping from cabal package name and version to debian package names. For example, versions of the cabal QuickCheck package less than 2 are mapped to "quickcheck1", while version 2 or greater is mapped to "quickcheck2".
VersionSplits | |
|
makePackage :: DebBase -> VersionSplits Source #
Create a version split database that assigns a single debian package name base to all cabal versions.
:: Version | Where to split the version range |
-> DebBase | The name to use for versions older than the split |
-> VersionSplits | |
-> VersionSplits |
Split the version range and give the older packages a new name.
Operators on VersionSplits
cabalFromDebian :: Map PackageName VersionSplits -> DebBase -> DebianVersion -> PackageName Source #
Brute force implementation - I'm assuming this is not a huge map.
cabalFromDebian' :: Map PackageName VersionSplits -> DebBase -> Version -> PackageIdentifier Source #
doSplits :: VersionSplits -> Maybe VersionReq -> DebBase Source #
Given a version split database, turn the debian version requirements into a debian package name base that ought to satisfy them.