-- Move

entrytree_move :: Entry a => [EntryTree a] -> InsertWhere -> [Loc] -> ([EntryTree a], Loc)
entrytree_move et insw locv =
    case insw_ of
        Nothing -> error "List of entries to be moved contains (a parent of) target."
        Just insw__ -> entrytree_insert et_ insw__ (reverse entries)
    where
        insw_ = loc_rm_effect_insw insw locv
        (et_, entries) = entrytree_remove_ et (reverse $ sort locv)

-- }}}


-- Expand & collapse {{{
entrytree_move :: Entry a => [EntryTree a] -> InsertWhere -> [Loc] -> ([EntryTree a], Loc)
entrytree_move et insw locv =
    case insw_ of
        Nothing -> error "List of entries to be moved contains (a parent of) target."
        Just insw__ -> entrytree_insert et_ insw__ (reverse entries)
    where
        insw_ = loc_rm_effect_insw insw locv
        (et_, entries) = entrytree_remove_ et (reverse $ sort locv)

-- }}}


-- Expand & collapse {{{
entrytree_move et insw locv =
    case insw_ of
        Nothing -> error "List of entries to be moved contains (a parent of) target."
        Just insw__ -> entrytree_insert et_ insw__ (reverse entries)
    where
        insw_ = loc_rm_effect_insw insw locv
        (et_, entries) = entrytree_remove_ et (reverse $ sort locv)

-- }}}


-- Expand & collapse {{{