on master help sign in
Version bump for #66
commitbd682ee2a874cda1e21a8a578e10409a85127832 authorMichael Snoyman <michael@snoyman.com> dateThu 13 Aug 2015, 13:40 (11 years ago) parent5fa9d63
3 files changed+17−1
ChangeLog.md+4 Data/Yaml/Pretty.hs+12 yaml.cabal+1−1
ChangeLog.md+4
@@ -1,3 +1,7 @@
1+## 0.8.13
2+
3+* Pretty module [#66](https://github.com/snoyberg/yaml/pull/66)
4+
15## 0.8.12
26
37* Proper handling of `String "+123"` [#64](https://github.com/snoyberg/yaml/issues/64)
Data/Yaml/Pretty.hs+12
@@ -1,4 +1,6 @@
11-- | Prettier YAML encoding.
2+--
3+-- Since 0.8.13
24module Data.Yaml.Pretty
35 ( encodePretty
46 , Config
@@ -18,17 +20,25 @@ import Data.List (sortBy)
1820import Data.ByteString (ByteString)
1921import Prelude hiding (null)
2022
23+-- |
24+-- Since 0.8.13
2125data Config = Config
2226 { confCompare :: Text -> Text -> Ordering -- ^ Function used to sort keys in objects
2327 }
2428
2529-- | The default configuration: do not sort objects.
30+--
31+-- Since 0.8.13
2632defConfig :: Config
2733defConfig = Config mempty
2834
35+-- |
36+-- Since 0.8.13
2937getConfCompare :: Config -> Text -> Text -> Ordering
3038getConfCompare = confCompare
3139
40+-- |
41+-- Since 0.8.13
3242setConfCompare :: (Text -> Text -> Ordering) -> Config -> Config
3343setConfCompare cmp c = c { confCompare = cmp }
3444
@@ -42,5 +52,7 @@ pretty cfg = go
4252 go (Bool b) = bool b
4353
4454-- | Configurable 'encode'.
55+--
56+-- Since 0.8.13
4557encodePretty :: ToJSON a => Config -> a -> ByteString
4658encodePretty cfg = toByteString . pretty cfg . toJSON
yaml.cabal+1−1
@@ -1,5 +1,5 @@
11name: yaml
2−version: 0.8.12
2+version: 0.8.13
33license: BSD3
44license-file: LICENSE
55author: Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov