| Copyright | Duncan Coutts et al. |
|---|---|
| License | BSD-3-Clause |
| Maintainer | Andreas Abel |
| Stability | provisional |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Distribution.Server.Util.CabalRevisions
Description
Validation and helpers for Cabal revision handling
Synopsis
- diffCabalRevisions :: ByteString -> ByteString -> Either String [Change]
- diffCabalRevisions' :: Bool -> ByteString -> ByteString -> Either String [Change]
- data Change = Change Severity String String String
- insertRevisionField :: Int -> ByteString -> ByteString
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.
Arguments
| :: Bool | check |
| -> ByteString | old revision |
| -> ByteString | new revision |
| -> Either String [Change] |
Like diffCabalRevisions but only optionally check x-revision field modifications.
Constructors
| Change Severity String String String |
insertRevisionField :: Int -> ByteString -> ByteString Source #
Insert or update "x-revision:" field