on master help sign in
Minor refactoring
commitaa79e0175f50fa08eb447cc9aa9475196cc4f4c6 authorSimon Hengel <sol@typeful.net> dateTue 14 Aug 2018, 09:37 (8 years ago) parentd60ae1e
1 file changed+3−3
src/Data/Yaml/Internal.hs+3−3
src/Data/Yaml/Internal.hs+3−3
@@ -249,12 +249,12 @@ parseM a front = do
249249 al' = if s == pack "<<"
250250 then case o of
251251 Object l -> M.union front l
252− Array l -> M.union front $ foldl merge' M.empty $ V.toList l
252+ Array l -> M.union front $ foldl mergeObjects M.empty $ V.toList l
253253 _ -> al
254254 else al
255255 parseM a al'
256− where merge' al (Object om) = M.union al om
257− merge' al _ = al
256+ where mergeObjects al (Object om) = M.union al om
257+ mergeObjects al _ = al
258258
259259decodeHelper :: FromJSON a
260260 => ConduitM () Y.Event Parse ()