packages feed

yaml 0.8.4 → 0.8.4.1

raw patch · 3 files changed

+22/−4 lines, 3 files

Files

Data/Yaml.hs view
@@ -260,11 +260,11 @@             let al  = M.insert s o front                 al' = if s == pack "<<"                          then case o of-                                  Object l  -> M.union al l-                                  Array l -> M.union al $ foldl merge' M.empty $ V.toList l+                                  Object l  -> M.union front l+                                  Array l -> M.union front $ foldl merge' M.empty $ V.toList l                                   _          -> al                          else al-            parseM a $ M.insert s o al'+            parseM a al'     where merge' al (Object om) = M.union al om           merge' al _           = al 
test/main.hs view
@@ -62,6 +62,8 @@         it "parses when titlecase" caseTitlecaseBool     describe "empty input" $ do         it "doesn't crash" caseEmptyInput+    describe "alias stripping" $ do+        it "works" caseStripAlias     describe "nulls" $ do         checkNull "null"         checkNull "Null"@@ -365,3 +367,19 @@     it ("null recognized: " ++ show x) assertion   where     assertion = Just (object [("foo", D.Null)]) @=? D.decode (B8.pack $ "foo: " ++ T.unpack x)++caseStripAlias :: Assertion+caseStripAlias =+    D.decode src @?= Just (object+        [ "Default" .= object+            [ "foo" .= (1 :: Int)+            , "bar" .= (2 :: Int)+            ]+        , "Obj" .= object+            [ "foo" .= (1 :: Int)+            , "bar" .= (2 :: Int)+            , "key" .= (3 :: Int)+            ]+        ])+  where+    src = "Default: &def\n  foo: 1\n  bar: 2\nObj:\n  <<: *def\n  key: 3\n"
yaml.cabal view
@@ -1,5 +1,5 @@ name:            yaml-version:         0.8.4+version:         0.8.4.1 license:         BSD3 license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov