REPL output for subtype of Function


How is one meant I override the default output in the REPL? This early thread Proper way to hook into REPL display of type seems to suggest using show, but this doesn’t work for subtypes of Function:

julia> struct Foo <: Function end

julia>,::Foo) = print(io, "hello")

julia> Foo()
(::Foo) (generic function with 0 methods)

julia> show(Foo())

julia> struct Foo <: Function end

julia>, ::MIME"text/plain", ::Foo) = print(io, "Hello")

julia> Foo()