format-numbers 0.1.0.0 → 0.1.0.1
raw patch · 4 files changed
+16/−11 lines, 4 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Data.Text.Format.Numbers: PrettyCfg :: !Int -> !(Maybe Char) -> !Char -> PrettyCfg
+ Data.Text.Format.Numbers: PrettyCfg :: !Int -> !Maybe Char -> !Char -> PrettyCfg
- Data.Text.Format.Numbers: [pc_thousandsSep] :: PrettyCfg -> !(Maybe Char)
+ Data.Text.Format.Numbers: [pc_thousandsSep] :: PrettyCfg -> !Maybe Char
Files
- format-numbers.cabal +10/−8
- package.yaml +2/−2
- src/Data/Text/Format/Numbers.hs +1/−1
- test/Data/Text/Format/NumbersSpec.hs +3/−0
format-numbers.cabal view
@@ -1,21 +1,22 @@--- This file has been generated from package.yaml by hpack version 0.15.0.+-- This file has been generated from package.yaml by hpack version 0.28.2. -- -- see: https://github.com/sol/hpack+--+-- hash: 7d51ca94c5905643aaa36ef11f9704470df5b53328d503e1ee3594b432f7a5c6 name: format-numbers-version: 0.1.0.0+version: 0.1.0.1 synopsis: Various number formatting functions description: Various number formatting functions category: Web homepage: https://github.com/agrafix/format-numbers#readme author: Alexander Thiemann maintainer: mail@athiemann.net-copyright: 2017 Alexander Thiemann <mail@athiemann.net>+copyright: 2017-2020 Alexander Thiemann <mail@athiemann.net> license: MIT license-file: LICENSE build-type: Simple cabal-version: >= 1.10- extra-source-files: package.yaml README.md@@ -25,7 +26,7 @@ hs-source-dirs: src build-depends:- base >= 4.7 && < 5+ base >=4.7 && <5 , text exposed-modules: Data.Text.Format.Numbers@@ -38,13 +39,14 @@ main-is: Test.hs hs-source-dirs: test- , src+ src cpp-options: -DTEST build-depends:- base >= 4.7 && < 5- , text+ base >=4.7 && <5 , hspec+ , text other-modules: Data.Text.Format.NumbersSpec Data.Text.Format.Numbers+ Paths_format_numbers default-language: Haskell2010
package.yaml view
@@ -1,12 +1,12 @@ name: format-numbers-version: 0.1.0.0+version: 0.1.0.1 synopsis: Various number formatting functions description: Various number formatting functions homepage: https://github.com/agrafix/format-numbers#readme license: MIT author: Alexander Thiemann maintainer: mail@athiemann.net-copyright: 2017 Alexander Thiemann <mail@athiemann.net>+copyright: 2017-2020 Alexander Thiemann <mail@athiemann.net> category: Web extra-source-files: - README.md
src/Data/Text/Format/Numbers.hs view
@@ -35,7 +35,7 @@ else prettyI pc_thousandsSep intPart postDecimal = if pc_decimals > 0- then T.cons pc_decimalSep (T.justifyLeft pc_decimals '0' $ T.pack $ show decPart)+ then T.cons pc_decimalSep (T.justifyRight pc_decimals '0' $ T.pack $ show decPart) else "" in preDecimal <> postDecimal
test/Data/Text/Format/NumbersSpec.hs view
@@ -29,6 +29,9 @@ formatTest (p 1 ' ' ',') 12.1 "12,1" formatTest (p 2 ' ' ',') 12.1 "12,10" formatTest (prettyF $ PrettyCfg 2 Nothing ',') 1200.1 "1200,10"+ formatTest (prettyF $ PrettyCfg 2 Nothing '.') 1200.01 "1200.01"+ formatTest (prettyF $ PrettyCfg 3 Nothing '.') 1200.01 "1200.010"+ formatTest (prettyF $ PrettyCfg 3 Nothing '.') 1200.001 "1200.001" describe "prettyInt" $ do formatTestI (prettyI $ Just ',') 81601710123 "81,601,710,123" formatTestI (prettyI $ Just ' ') 81601710123 "81 601 710 123"