hackage-cli-0.1.0.2: CLI tool for Hackage
CopyrightDuncan Coutts et al.
LicenseBSD-3-Clause
MaintainerAndreas Abel
Stabilityprovisional
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Distribution.Server.Util.CabalRevisions

Description

Validation and helpers for Cabal revision handling

Synopsis

Documentation

diffCabalRevisions :: ByteString -> ByteString -> Either String [Change] Source #

Entry point to cabal revision validator

This takes an original and a revised .cabal decoded as Unicode String and performs validations. Returns either a validation error or a list of detected changes.

diffCabalRevisions' Source #

Arguments

:: Bool

check x-revision

-> ByteString

old revision

-> ByteString

new revision

-> Either String [Change] 

Like diffCabalRevisions but only optionally check x-revision field modifications.

data Change Source #

Constructors

Change Severity String String String 

Instances

Instances details
Show Change Source # 
Instance details

Defined in Distribution.Server.Util.CabalRevisions

Methods

showsPrec :: Int -> Change -> ShowS

show :: Change -> String

showList :: [Change] -> ShowS

insertRevisionField :: Int -> ByteString -> ByteString Source #

Insert or update "x-revision:" field