packages feed

autodocodec-exact 0.0.0.1 → 0.0.0.2

raw patch · 3 files changed

+16/−5 lines, 3 filesdep ~autodocodecPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: autodocodec

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,11 @@ # Changelog +## [0.0.0.2] - 2026-07-14++### Changed++* Lower bound on `autodocodec >=0.6`+ ## [0.0.0.1] - 2025-06-20  ### Changed
autodocodec-exact.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.36.1.+-- This file has been generated from package.yaml by hpack version 0.38.3. -- -- see: https://github.com/sol/hpack  name:           autodocodec-exact-version:        0.0.0.1+version:        0.0.0.2 synopsis:       Exact decoder for autodocodec homepage:       https://github.com/NorfairKing/autodocodec#readme bug-reports:    https://github.com/NorfairKing/autodocodec/issues@@ -33,7 +33,7 @@   build-depends:       aeson     , aeson-pretty-    , autodocodec >=0.5.0.0+    , autodocodec >=0.6.0.0     , base >=4.7 && <5     , bytestring     , containers
src/Autodocodec/Exact.hs view
@@ -107,10 +107,12 @@       case value of         JSON.Bool b -> return $ coerce b         _ -> exactError $ ExactParseErrorTypeMismatch "a boolean" value-  StringCodec mname ->+  StringCodec mname bounds ->     withNamed mname $       case value of-        JSON.String s -> return $ coerce s+        JSON.String s -> case checkStringBounds bounds s of+          Left err -> exactError $ ExactParseErrorStringOutOfBounds bounds s err+          Right s' -> pure $ coerce s'         _ -> exactError $ ExactParseErrorTypeMismatch "a string" value   IntegerCodec mname bounds ->     withNamed mname $@@ -490,6 +492,7 @@   | ExactParseErrorDisjointBothSucceeded   | ExactParseErrorDisjointBothFailed !ExactParseError !ExactParseError   | ExactParseErrorUnsafeNumber !(Bounds Scientific) !Scientific !String+  | ExactParseErrorStringOutOfBounds !StringBounds !Text !String   | ExactParseErrorNumberOutOfBounds !(Bounds Scientific) !Scientific !String   | ExactParseErrorIntegerOutOfBounds !(Bounds Integer) !Integer !String   | ExactParseErrorMissingRequiredKey !Key !JSON.Object@@ -551,6 +554,8 @@     [unwords ["Number is out of bounds:", show @Scientific s], err]   ExactParseErrorIntegerOutOfBounds _ i err ->     [unwords ["Integer is out of bounds:", show @Integer i], err]+  ExactParseErrorStringOutOfBounds _ t err ->+    [unwords ["String is out of bounds:", show @Text t], err]   ExactParseErrorMissingRequiredKey key o ->     appendOnLine' ["Missing required key:", show @Key key ++ ", in object:"] (showObject o)   ExactParseErrorMissingDiscriminator key o ->