6 indent ('\n':q) = "\n "++(indent q)
7 indent (a:b) = a:(indent b)
11 join c (x:y) = x++c++(join c y)
13 class FromTree a where
15 class FromTrees a where
16 fromTrees :: [Tree] -> a
17 instance FromTree a => FromTree [a] where
18 fromTree (Tree _ c _) = map fromTree c
19 instance FromTree String where
20 fromTree (Tree h c _) = h++(concatMap fromTree c)
21 instance FromTrees String where
22 fromTrees ts = concatMap (fromTree :: Tree -> String) ts