JuliaVariables.jl icon indicating copy to clipboard operation
JuliaVariables.jl copied to clipboard

"Type aliases" like `X{T} = Y{T, S}` are not handled

Open tkf opened this issue 6 years ago • 2 comments

It seems that "type aliases" are not handled correctly at the moment:

julia> solve(:(X{T} = Y{T, S}))
:((@global X){@global T} = (@global Y){@global T, @global S})

I suppose the result should be

:((@global X){@T} = (@global Y){@T, @global S})

?

tkf avatar Nov 01 '19 07:11 tkf

Yes, it's a bit complex, and requires more efforts to match the correct semantics. I remembered you've sent the link of the scheme file(julia-syntax.scm) which implements the syntax analysis, but it's in quite a huge scale so I cannot reach the same functions immediately.

thautwarm avatar Nov 01 '19 09:11 thautwarm

Yes, Julia language is a huge target and I admire your courage to implement JuliaVariables.jl :)

the scheme file(julia-syntax.scm) which implements the syntax analysis

I'm not familiar with compiler/language things, but I thought this analysis is done while lowering. But I'm not sure.

tkf avatar Nov 01 '19 20:11 tkf