Suppose I have some type T{P1,P2,P3} depending some parameters. I don't
know which type exactly, except that it originates from a type hierarchy
which has 3 parameters. What is the best way to construct, given e.g. a
variable of type T{P1,P2,P3} with specific values for P1, P2, P3, to
construct the 'super' type T{P1,P2}. If TT = T{Float64,Float64,Float64}
then I know I could do TT.parameters = (TT.parameters[1],
TT.parameters[2], TypeVar(P3) ). But it turns out that is not yet
completely identical to T{Float64,Float64}, although TT==T{Float64,Float64}
and TT===T{Float64,Float64} evaluate to true. However, not all fields of TT
seem to be identical to those of T{Float64,Float64}. What is the
recommended strategy ? Is there a specific method for doing this?