mergeCommentedMap :: Ord k => (v -> v -> v) -> Var.CommentedMap k v -> Var.CommentedMap k v -> Var.CommentedMap k v
mergeCommentedMap merge left right =
    let
        merge' (Commented pre1 a post1) (Commented pre2 b post2) =
            Commented (pre1 ++ pre2) (merge a b) (post1 ++ post2)
    in
    unionWith merge' left right
mergeCommentedMap :: Ord k => (v -> v -> v) -> Var.CommentedMap k v -> Var.CommentedMap k v -> Var.CommentedMap k v
mergeCommentedMap merge left right =
    let
        merge' (Commented pre1 a post1) (Commented pre2 b post2) =
            Commented (pre1 ++ pre2) (merge a b) (post1 ++ post2)
    in
    unionWith merge' left right
mergeCommentedMap merge left right =
    let
        merge' (Commented pre1 a post1) (Commented pre2 b post2) =
            Commented (pre1 ++ pre2) (merge a b) (post1 ++ post2)
    in
    unionWith merge' left right