on master help sign in
Added tag test
55fee44Michael Snoyman
Data/Object/Yaml.hs+1
@@ -52,6 +52,7 @@ data Yaml = Yaml
52 , tag :: String
52 , tag :: String
53 , style :: Style
53 , style :: Style
54 }
54 }
55+ deriving (Show, Eq)
55instance ConvertSuccess Yaml Event where
56instance ConvertSuccess Yaml Event where
56 convertSuccess (Yaml v t s) = EventScalar v (convertSuccess t) s
57 convertSuccess (Yaml v t s) = EventScalar v (convertSuccess t) s
57
58
test/tags.hsnew file+7
@@ -0,0 +1,7 @@
1+import Text.Yaml
2+import qualified Data.ByteString as B
3+
4+main = do
5+ bs <- B.readFile "tags.yaml"
6+ yo <- decodeYaml' bs
7+ print yo
test/tags.yamlnew file+3
@@ -0,0 +1,3 @@
1+this: !!int 5
2+that: !!float "89"
3+'other': !mine foobarbaz