Specifying output container type based on input container

There is no API for specifying what the element type of an output array (or its dimensionality) ought to be because that’s not something inherent to the type system you can specify for dispatch

Sorry, not sure I follow. Are you stating this as a terminology thing, or are you actually saying the effect of :: has no effect on the function? Because, for example:

f(x::AbstractArray{Float64})::AbstractArray{Float32} = x

f(randn(Float64, 100)) # this is now of type Array{Float32}

Regardless of this finer point, the reason I want to specify container type is simply to help out the compiler for functions where the output type is ambiguous, and it might not be able to infer it by itself.