optparse-generic 1.4.3 → 1.4.4
raw patch · 3 files changed
+7/−3 lines, 3 filesdep ~bytestringdep ~timedep ~transformersPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: bytestring, time, transformers
API changes (from Hackage documentation)
- Options.Generic: readIntegralBounded :: forall a. (Integral a, Bounded a, Typeable a) => ReadM a
+ Options.Generic: readIntegralBounded :: forall a. (Integral a, Bounded a, Typeable a, ParseField a) => ReadM a
Files
- CHANGELOG.md +4/−0
- optparse-generic.cabal +1/−1
- src/Options/Generic.hs +2/−2
CHANGELOG.md view
@@ -1,3 +1,7 @@+1.4.4++* `readIntegralBounded`: use `metavar` in error message+ 1.4.3 * Export internal `readIntegralBounded` utility
optparse-generic.cabal view
@@ -1,5 +1,5 @@ Name: optparse-generic-Version: 1.4.3+Version: 1.4.4 Cabal-Version: >=1.10 Build-Type: Simple License: BSD3
src/Options/Generic.hs view
@@ -452,7 +452,7 @@ instance ParseField () instance ParseField Void -readIntegralBounded :: forall a. (Integral a, Bounded a, Typeable a) => ReadM a+readIntegralBounded :: forall a. (Integral a, Bounded a, Typeable a, ParseField a) => ReadM a readIntegralBounded = auto >>= f where@@ -461,7 +461,7 @@ | otherwise = pure $ fromInteger i lower = toInteger (minBound :: a) upper = toInteger (maxBound :: a)- msg = map toUpper (show (Data.Typeable.typeOf (undefined :: a))) <>+ msg = metavar (Proxy :: Proxy a) <> " must be within the range [" <> show lower <> " .. " <> show upper <> "]"