on master help sign in
Added tag test
commit55fee44d69ffd4bcbd9e740f2e81a295ca1a893f authorMichael Snoyman <michael@snoyman.com> dateThu 10 Dec 2009, 02:47 (17 years ago) parent9c4fe54
3 files changed+11
Data/Object/Yaml.hs+1 test/tags.hs+7 test/tags.yaml+3
Data/Object/Yaml.hs+1
@@ -52,6 +52,7 @@ data Yaml = Yaml
5252 , tag :: String
5353 , style :: Style
5454 }
55+ deriving (Show, Eq)
5556instance ConvertSuccess Yaml Event where
5657 convertSuccess (Yaml v t s) = EventScalar v (convertSuccess t) s
5758
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