assert-failure 0.1.2.6 → 0.1.3.0
raw patch · 2 files changed
+6/−5 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
Control/Exception/Assert/Sugar.hs view
@@ -27,7 +27,7 @@ -- -- > assert (age < 120 `blame` age) $ savings / (120 - age) blame :: Show v => Bool -> v -> Bool-{-# NOINLINE blame #-}+{-# INLINABLE blame #-} blame True _ = True blame False blamed = trace (blameMessage blamed) False @@ -45,7 +45,7 @@ -- prevents warnings about defaulting, even when @OverloadedStrings@ -- extension is enabled. showFailure :: Show v => String -> v -> String-{-# NOINLINE showFailure #-}+{-# INLINABLE showFailure #-} showFailure s blamed = "Internal failure occurred and the following is to blame:\n " ++ s ++ "\n "@@ -67,12 +67,13 @@ -- -- > assert (allB (<= height) [yf, y1, y2]) allB :: Show v => (v -> Bool) -> [v] -> Bool-{-# NOINLINE allB #-}+{-# INLINABLE allB #-} allB predicate l = case all predicate l of True -> True False -> trace (allBMessage predicate l) False allBMessage :: Show v => (v -> Bool) -> [v] -> String+{-# INLINABLE allBMessage #-} allBMessage predicate l = "The following items on the list don't respect the contract:\n" ++ Show.Pretty.ppShow (filter (not . predicate) l)
assert-failure.cabal view
@@ -6,7 +6,7 @@ -- PVP summary:+-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.1.2.6+version: 0.1.3.0 synopsis: Syntactic sugar improving 'assert' and 'error' description: This library contains syntactic sugar that makes it easier to write simple contracts with 'assert' and 'error'@@ -15,7 +15,7 @@ bug-reports: https://github.com/Mikolaj/assert-failure/issues license: BSD3 license-file: LICENSE-tested-with: GHC ==7.10.3 || ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.3 || ==9.4+tested-with: GHC ==7.10.3 || ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.3 || ==9.4 || ==9.6 data-files: LICENSE, README.md author: Mikolaj Konarski maintainer: Mikolaj Konarski <mikolaj.konarski@funktory.com>