Copyright | Duncan Coutts et al. |
---|---|
License | BSD-3-Clause |
Maintainer | libraries@haskell.org |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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.
:: Bool | check |
-> ByteString | old revision |
-> ByteString | new revision |
-> Either String [Change] |
Like diffCabalRevisions
but only optionally check x-revision
field modifications.
insertRevisionField :: Int -> ByteString -> ByteString Source #
Insert or update "x-revision:" field