on master help sign in
Prep for release
commitf7b4ce8760e0626dcbf8c849c363365bee1ae6b8 authorMichael Snoyman <michael@snoyman.com> dateTue 11 Feb 2014, 11:49 (13 years ago) parentdabc84c
4 files changed+15−1
Data/Yaml/Builder.hs+2 Data/Yaml/Parser.hs+3 builder-test.hs+6 yaml.cabal+4−1
Data/Yaml/Builder.hs+2
@@ -1,4 +1,6 @@
11{-# LANGUAGE FlexibleInstances #-}
2+-- | NOTE: This module is a highly experimental preview release. It may change
3+-- drastically, or be entirely removed, in a future release.
24module Data.Yaml.Builder
35 ( YamlBuilder (..)
46 , ToYaml (..)
Data/Yaml/Parser.hs+3
@@ -1,5 +1,7 @@
11{-# LANGUAGE DeriveDataTypeable #-}
22{-# LANGUAGE OverloadedStrings #-}
3+-- | NOTE: This module is a highly experimental preview release. It may change
4+-- drastically, or be entirely removed, in a future release.
35module Data.Yaml.Parser where
46
57import Text.Libyaml
@@ -178,6 +180,7 @@ sinkValue =
178180 let k = decodeUtf8 a
179181 v <- start
180182 goM (front . ((k, v):))
183+ Just e -> monadThrow $ UnexpectedEvent e
181184
182185sinkRawDoc :: MonadThrow m => Consumer Event m RawDoc
183186sinkRawDoc = uncurry RawDoc <$> runWriterSC sinkValue
builder-test.hs+6
@@ -18,4 +18,10 @@ main = do
1818 S.putStr $ toByteString
1919 [ Person "Alice" 57
2020 , Person "Bob" 23
21+ , Person "12345" 23
22+ ]
23+ writeYamlFile "/tmp/foo.yaml" $
24+ [ Person "Alice" 57
25+ , Person "Bob" 23
26+ , Person "12345" 23
2127 ]
yaml.cabal+4−1
@@ -1,5 +1,5 @@
11name: yaml
2−version: 0.8.6.2
2+version: 0.8.7
33license: BSD3
44license-file: LICENSE
55author: Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov
@@ -52,6 +52,9 @@ library
5252 , scientific
5353 exposed-modules: Text.Libyaml
5454 Data.Yaml
55+ Data.Yaml.Aeson
56+ Data.Yaml.Builder
57+ Data.Yaml.Parser
5558 ghc-options: -Wall
5659 c-sources: c/helper.c
5760 include-dirs: c