# Recover full printing of \`UnionAll\` type

**URL:** <https://discourse.julialang.org/t/recover-full-printing-of-unionall-type/102693>\
**Category:** General Usage\
**Tags:** question\
**Created:** [August 10, 2023, 7:42pm UTC](https://discourse.julialang.org/t/recover-full-printing-of-unionall-type/102693 "2023-08-10T19:42:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CameronBieganek](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cameronbieganek/32/6915_2.png) [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Post date:** [August 10, 2023, 7:42pm UTC](https://discourse.julialang.org/t/recover-full-printing-of-unionall-type/102693/1 "2023-08-10T19:42:15Z")

</div>

As discussed in [this thread](https://discourse.julialang.org/t/printing-of-unionall-types-is-misleading-as-of-julia-version-1-7/89418), printing of `UnionAll` types changed in Julia 1.7, as demonstrated here:

## 1.6

```julia
julia> struct Foo{A,B} end

julia> Foo{Int}
Foo{Int64, B} where B

```

## 1.7

```julia
julia> struct Foo{A,B} end

julia> Foo{Int}
Foo{Int64}

```

Is there a way to recover the full `UnionAll` printing for `Foo{Int}`? Something like `printunionall(Foo{Int})`? (Obviously that doesn’t work, but you get the idea.)

---

<div class="post-metadata">

**Author:** ![algunion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/algunion/32/51630_2.png) [@algunion](https://discourse.julialang.org/u/algunion)\
**Post date:** [August 10, 2023, 7:45pm UTC](https://discourse.julialang.org/t/recover-full-printing-of-unionall-type/102693/2 "2023-08-10T19:45:00Z")

</div>

> [@CameronBieganek](#):
>
> Is there a way to recover the full `UnionAll` printing for `Foo{Int}`? Something like `printunionall(Foo{Int})`? (Obviously that doesn’t work, but you get the idea.)

`Base.unwrap_unionall` seems to achieve something close to that:

```julia
struct Foo{A,B,C} end

Foo{Int} |> Base.unwrap_unionall
# will produce: Foo{Int64, B, C}

Foo{Int,String} |> Base.unwrap_unionall
# will produce: Foo{Int64, String, C}

```
