on master help sign in
Add speculative changelog info.
8e05045gmorpheme
libyaml/src/Text/Libyaml.hs+16−1
@@ -671,16 +671,31 @@ parserParseOne' parser = allocaBytes eventSize $ \er -> do
671 return $ Left $ YamlParseException problem context problemMark
671 return $ Left $ YamlParseException problem context problemMark
672 else Right <$> getEvent er
672 else Right <$> getEvent er
673
673
674−
674+-- | Whether a tag should be rendered explicitly in the output or left
675+-- implicit.
676+--
677+-- @since 0.11.1.0
675data TagRender = Explicit | Implicit
678data TagRender = Explicit | Implicit
676 deriving (Enum)
679 deriving (Enum)
677
680
681+-- | A value for 'formatOptionsRenderCollectionTags' that renders no
682+-- tags.
683+--
684+-- @since 0.11.1.0
678renderNone :: Event -> TagRender
685renderNone :: Event -> TagRender
679renderNone _ = Implicit
686renderNone _ = Implicit
680
687
688+-- | A value for 'formatOptionsRenderCollectionTags' that renders all
689+-- tags.
690+--
691+-- @since 0.11.1.0
681renderAll :: Event -> TagRender
692renderAll :: Event -> TagRender
682renderAll _ = Explicit
693renderAll _ = Explicit
683
694
695+-- | A value for 'formatOptionsRenderCollectionTags' that renders tags
696+-- which are instances of 'UriTag'
697+--
698+-- @since 0.11.1.0
684renderUriTags :: Event -> TagRender
699renderUriTags :: Event -> TagRender
685renderUriTags (EventScalar _ UriTag{} _ _) = Explicit
700renderUriTags (EventScalar _ UriTag{} _ _) = Explicit
686renderUriTags (EventSequenceStart UriTag{} _ _) = Explicit
701renderUriTags (EventSequenceStart UriTag{} _ _) = Explicit
yaml/ChangeLog.md+4
@@ -1,5 +1,9 @@
1# ChangeLog for yaml
1# ChangeLog for yaml
2
2
3+## 0.11.1.0
4+
5+* Add an option to `FormatOptions` to govern when tags on collections are rendered explicitly and when they are left implicit. [#165](https://github.com/snoyberg/yaml/issues/165)
6+
3## 0.11.0.0
7## 0.11.0.0
4
8
5* Split out the `libyaml` and `Text.Libyaml` code into its own package. [#145](https://github.com/snoyberg/yaml/issues/145)
9* Split out the `libyaml` and `Text.Libyaml` code into its own package. [#145](https://github.com/snoyberg/yaml/issues/145)