packages feed

toml-parser 1.3.1.0 → 1.3.1.1

raw patch · 4 files changed

+14/−8 lines, 4 files

Files

ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for toml-parser +## 1.3.1.1++* Ensure years are rendered zero-padded+ ## 1.3.1.0  * Added `Toml.Semantics.Ordered` for preserving input TOML orderings
src/Toml/Pretty.hs view
@@ -181,10 +181,10 @@     TimeOfDay tod       -> annotate DateClass (fromString (formatTime defaultTimeLocale "%H:%M:%S%Q" tod))     ZonedTime zt         | timeZoneMinutes (zonedTimeZone zt) == 0 ->-                           annotate DateClass (fromString (formatTime defaultTimeLocale "%Y-%m-%dT%H:%M:%S%QZ" zt))-        | otherwise     -> annotate DateClass (fromString (formatTime defaultTimeLocale "%Y-%m-%dT%H:%M:%S%Q%Ez" zt))-    LocalTime lt        -> annotate DateClass (fromString (formatTime defaultTimeLocale "%Y-%m-%dT%H:%M:%S%Q" lt))-    Day d               -> annotate DateClass (fromString (formatTime defaultTimeLocale "%Y-%m-%d" d))+                           annotate DateClass (fromString (formatTime defaultTimeLocale "%0Y-%m-%dT%H:%M:%S%QZ" zt))+        | otherwise     -> annotate DateClass (fromString (formatTime defaultTimeLocale "%0Y-%m-%dT%H:%M:%S%Q%Ez" zt))+    LocalTime lt        -> annotate DateClass (fromString (formatTime defaultTimeLocale "%0Y-%m-%dT%H:%M:%S%Q" lt))+    Day d               -> annotate DateClass (fromString (formatTime defaultTimeLocale "%0Y-%m-%d" d))  prettySmartString :: String -> TomlDoc prettySmartString str
test/PrettySpec.hs view
@@ -105,14 +105,16 @@             c = 2020-05-07T15:16:17.990             d = 2020-05-07T15:16:17.990Z             e = 2020-05-07T15:16:17-07:00-            f = 2021-09-06T14:15:19+08:00|])+            f = 2021-09-06T14:15:19+08:00+            g = 0008-10-11T12:13:14+15:00|])         `shouldBe` Right [quoteStr|             a = 2020-05-07             b = 15:16:17.99             c = 2020-05-07T15:16:17.99             d = 2020-05-07T15:16:17.99Z             e = 2020-05-07T15:16:17-07:00-            f = 2021-09-06T14:15:19+08:00|]+            f = 2021-09-06T14:15:19+08:00+            g = 0008-10-11T12:13:14+15:00|]      it "renders quoted keys" $         fmap tomlString (parse "''.'a b'.'\"' = 10")
toml-parser.cabal view
@@ -1,6 +1,6 @@ cabal-version:      3.0 name:               toml-parser-version:            1.3.1.0+version:            1.3.1.1 synopsis:           TOML 1.0.0 parser description:     TOML parser using generated lexers and parsers with@@ -13,7 +13,7 @@ copyright:          2023 Eric Mertens category:           Text build-type:         Simple-tested-with:        GHC == {8.10.7, 9.0.2, 9.2.8, 9.4.7, 9.6.3}+tested-with:        GHC == {8.10.7, 9.0.2, 9.2.8, 9.4.8, 9.6.3, 9.8.1}  extra-doc-files:     ChangeLog.md