flatten_item i = case i of
    Unit a -> [ a ]
    Packed t -> flatten t
flatten_item i = case i of
    Unit a -> [ a ]
    Packed t -> flatten t
flatten_item i = case i of
    Unit a -> [ a ]
    Packed t -> flatten t