Having said that, You may do
type SomeType{T}
value::Int
end
Then, you can use typealias TypeA and TypeB as
typealias TypeA SomeType{:A}
typealias TypeB SomeType{:B}
You can have functions with SomeType{T} in general. When "A" or "B" is needed I guess you can use string(T) to get that.
type SomeType
name::ASCIIString
value::Int
end
#No 'typealiase's
TypeA(x)=SomeType("A",x)
TypeB(x)=SomeType("B",x)
But TypeA and TypeB will not be 'type's.
I may have not understood you well but definetely, you cannot achieve what you want with 'typealias'.