-- }}}


-- Conversions: flatten, list_to_entrytree {{{

entrytree_flatten :: Entry a => [EntryTree a] -> [(Bool, Int, a)]
entrytree_flatten et =
    entrytree_map f et
    where
       f e chflat (Loc loc) =
           (entrytree_expanded e, length loc, entrytree_thisentry e):chflat
entrytree_flatten :: Entry a => [EntryTree a] -> [(Bool, Int, a)]
entrytree_flatten et =
    entrytree_map f et
    where
       f e chflat (Loc loc) =
           (entrytree_expanded e, length loc, entrytree_thisentry e):chflat
entrytree_flatten et =
    entrytree_map f et
    where
       f e chflat (Loc loc) =
           (entrytree_expanded e, length loc, entrytree_thisentry e):chflat