Repository: JuliaLang/julia
File: src/rtutils.c (C)

Code before:
                n += jl_printf(out, "(");
            n += jl_static_show_x(out, lb, depth, ctx);
            if (ua)
                n += jl_printf(out, ")");
            n += jl_printf(out, "<:");
        }
        n += jl_static_show_symbol(out, var->name);
        if (showbounds && (ub != (jl_value_t*)jl_any_type || lb != jl_bottom_type)) {
            // show type-var upper bound if it is defined, or if we showed the lower bound
            int ua = jl_is_unionall(ub);
            n += jl_printf(out, "<:");
            if (ua)
                n += jl_printf(out, "(");
            n += jl_static_show_x(out, ub, depth, ctx);
            if (ua)
                n += jl_printf(out, ")");
        }
    }
    else if (vt == jl_module_type) {
        jl_module_t *m = (jl_module_t*)v;
        if (m->parent != m && m->parent != jl_main_module) {
            n += jl_static_show_x(out, (jl_value_t*)m->parent, depth, ctx);
            n += jl_printf(out, ".");
        }
        n += jl_static_show_symbol(out, m->name);
    }
    else if (vt == jl_symbol_type) {
        n += jl_printf(out, ":");
        n += jl_static_show_symbol(out, (jl_sym_t*)v);
    }
    else if (vt == jl_ssavalue_type) {
        n += jl_printf(out, "SSAValue(%" PRIuPTR ")",
                       (uintptr_t)((jl_ssavalue_t*)v)->id);
    }
    else if (vt == jl_globalref_type) {
        n += jl_static_show_x(out, (jl_value_t*)jl_globalref_mod(v), depth, ctx);
        jl_sym_t *name = jl_globalref_name(v);
        n += jl_printf(out, ".");
        if (jl_is_operator(jl_symbol_name(name)))
            n += jl_printf(out, ":(%s)", jl_symbol_name(name));
        else
            n += jl_static_show_symbol(out, name);
    }
    else if (vt == jl_gotonode_type) {
        n += jl_printf(out, "goto %" PRIuPTR, jl_gotonode_label(v));
    }
    else if (vt == jl_quotenode_type) {
        jl_value_t *qv = *(jl_value_t**)v;
        if (!jl_is_symbol(qv)) {
            n += jl_printf(out, "quote ");
        }

Review comment (suggestion):
Can you fix-up Pointer types as well?
```julia
julia> ccall(:jl_, Cvoid, (Any,), Val(Ptr{Cvoid}(1)))
Base.Val{0x0000000000000001}()
```
It's a little awkward, because their `repr` doesn't round-trip either:
```julia
julia> Val(Ptr{Cvoid}(1))
Val{Ptr{Nothing} @0x0000000000000001}()

julia> Val{Ptr{Nothing} @0x0000000000000001}()
ERROR: ParseError:
# Error @ REPL[10]:1:18
Val{Ptr{Nothing} @0x0000000000000001}()
#                └─────────────────┘ ── Expected `}`
```
but regardless of whether it parses properly, I don't think we should be throwing out the type information

Code after:
    else if (vt == jl_int32_type) {
        n += jl_printf(out, "Int32(%" PRId32 ")", *(int32_t*)v);
    }
    else if (vt == jl_int16_type) {
        n += jl_printf(out, "Int16(%" PRId16 ")", *(int16_t*)v);
    }
    else if (vt == jl_int8_type) {
        n += jl_printf(out, "Int8(%" PRId8 ")", *(int8_t*)v);
    }
    else if (vt == jl_uint64_type) {
        n += jl_printf(out, "0x%016" PRIx64, *(uint64_t*)v);
    }
    else if (vt == jl_uint32_type) {
        n += jl_printf(out, "0x%08" PRIx32, *(uint32_t*)v);
    }
    else if (vt == jl_uint16_type) {
        n += jl_printf(out, "0x%04" PRIx16, *(uint16_t*)v);
    }
    else if (vt == jl_uint8_type) {
        n += jl_printf(out, "0x%02" PRIx8, *(uint8_t*)v);
    }
    else if (jl_pointer_type && jl_is_cpointer_type((jl_value_t*)vt)) {
#ifdef _P64
        n += jl_printf(out, "0x%016" PRIx64, *(uint64_t*)v);
#else
        n += jl_printf(out, "0x%08" PRIx32, *(uint32_t*)v);
#endif
    }
    else if (vt == jl_float16_type) {
        n += jl_static_show_float(out, julia_half_to_float(*(uint16_t *)v), vt);
    }
    else if (vt == jl_float32_type) {
        n += jl_static_show_float(out, *(float *)v, vt);
    }
    else if (vt == jl_float64_type) {
        n += jl_static_show_float(out, *(double *)v, vt);
    }
    else if (vt == jl_bool_type) {
        n += jl_printf(out, "%s", *(uint8_t*)v ? "true" : "false");
    }
    else if (v == jl_nothing || (jl_nothing && (jl_value_t*)vt == jl_typeof(jl_nothing))) {
        n += jl_printf(out, "nothing");
    }
    else if (vt == jl_string_type) {
        n += jl_static_show_string(out, jl_string_data(v), jl_string_len(v), 1, 0);
    }
    else if (v == jl_bottom_type) {
        n += jl_printf(out, "Union{}");
    }
    else if (vt == jl_uniontype_type) {
        n += jl_printf(out, "Union{");