packages feed

formatting 5.3 → 5.4

raw patch · 2 files changed

+7/−2 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Formatting.Formatters: plural :: (Num a, Eq a) => Text -> Text -> Format a

Files

formatting.cabal view
@@ -1,5 +1,5 @@ name:                formatting-version:             5.3+version:             5.4 synopsis:            Combinator-based type-safe formatting (like printf() or FORMAT) description:         Combinator-based type-safe formatting (like printf() or FORMAT), modelled from the HoleyMonoids package. license:             BSD3
src/Formatting/Formatters.hs view
@@ -35,6 +35,7 @@   groupInt,   commas,   ords,+  plural,   asInt,   -- * Padding   left,@@ -219,7 +220,11 @@               _ -> "th"           where tens = n `mod` 100 --- Bases+-- | English plural suffix for an integral.+plural :: (Num a, Eq a) => Text -> Text -> Format a+plural s p = later (\i -> if i == 1 then B.build s else B.build p)++-- | Render an integral at base n. base :: Integral a => Int -> Format a base numBase = later (B.build . atBase numBase)