module Data.RPM (
module Data.RPM.NV,
module Data.RPM.NVR,
module Data.RPM.NVRA,
module Data.RPM.VerRel,
module Data.RPM.VerCmp,
dropRelease,
addRelease,
dropArch,
addArch
) where
import Data.RPM.NV
import Data.RPM.NVR
import Data.RPM.NVRA
import Data.RPM.VerCmp
import Data.RPM.VerRel
dropRelease :: NVR -> NV
dropRelease :: NVR -> NV
dropRelease (NVR n :: String
n (VerRel v :: String
v _)) = String -> String -> NV
NV String
n String
v
addRelease :: NV -> String -> NVR
addRelease :: NV -> String -> NVR
addRelease _ "" = String -> NVR
forall a. HasCallStack => String -> a
error "addRelease: release cannot be empty"
addRelease (NV n :: String
n v :: String
v) r :: String
r = String -> VerRel -> NVR
NVR String
n (String -> String -> VerRel
VerRel String
v String
r)
dropArch :: NVRA -> NVR
dropArch :: NVRA -> NVR
dropArch (NVRA n :: String
n vr :: VerRel
vr _) = String -> VerRel -> NVR
NVR String
n VerRel
vr
addArch :: NVR -> String -> NVRA
addArch :: NVR -> String -> NVRA
addArch _ "" = String -> NVRA
forall a. HasCallStack => String -> a
error "addArch: arch cannot be empty"
addArch (NVR n :: String
n vr :: VerRel
vr) a :: String
a = String -> VerRel -> String -> NVRA
NVRA String
n VerRel
vr String
a