Add missing case
This commit is contained in:
@@ -163,20 +163,24 @@ logMB (MBranch str _ mt) = root ++.~ (str ++ ":") $ logMT mt
|
|||||||
|
|
||||||
logMT :: MetaTree a -> Tree String
|
logMT :: MetaTree a -> Tree String
|
||||||
logMT mt = case mt of
|
logMT mt = case mt of
|
||||||
MTree str _ branches -> Node ("M:"++str) $ map logMB branches
|
MTree str _ brs -> Node ("M:"++str) $ map logMB brs
|
||||||
BTree str _ branches -> Node str $ map logMT branches
|
BTree str _ brs -> Node str $ map logMT brs
|
||||||
|
|
||||||
composeAndSubLog :: MetaTree a -> IO (Tree a)
|
composeAndSubLog :: MetaTree a -> IO (Tree a)
|
||||||
composeAndSubLog mt = case mt of
|
composeAndSubLog mt = case mt of
|
||||||
mt@MTree{} -> composeAndLog mt
|
MTree{} -> composeAndLog mt
|
||||||
bt -> do
|
bt -> do
|
||||||
branches <- mapM composeAndSubLog $ _btBranches bt
|
brs <- mapM composeAndSubLog $ _btBranches bt
|
||||||
return $ Node (_btValue bt) branches
|
return $ Node (_btValue bt) brs
|
||||||
|
|
||||||
composeAndLog :: MetaTree a -> IO (Tree a)
|
composeAndLog :: MetaTree a -> IO (Tree a)
|
||||||
composeAndLog mt = case mt of
|
composeAndLog mt = case mt of
|
||||||
mt@MTree{} -> do
|
MTree{} -> do
|
||||||
putStrLn $ drawTree $ logMT mt
|
putStrLn $ drawTree $ logMT mt
|
||||||
rt <- composeAndLog $ _mtTree mt
|
rt <- composeAndLog $ _mtTree mt
|
||||||
branches <- mapM (\mb -> (_mbAttach mb,) <$> composeAndSubLog (_mbTree mb)) $ _mtBranches mt
|
brs <- mapM (\mb -> (_mbAttach mb,) <$> composeAndSubLog (_mbTree mb)) $ _mtBranches mt
|
||||||
return $ attachList rt $ map pure branches
|
return $ attachList rt $ map pure brs
|
||||||
|
BTree{} -> do
|
||||||
|
putStrLn $ drawTree $ logMT mt
|
||||||
|
brs <- mapM composeAndSubLog $ _btBranches mt
|
||||||
|
return $ Node (_btValue mt) brs
|
||||||
|
|||||||
Reference in New Issue
Block a user