CanonicalTraits.jl
CanonicalTraits.jl copied to clipboard
Reasoning about return types?
Hi Taine,
In one of your example, you have
@trait Addable{L, R} begin
(+) :: [L, R] => Any
(+) = Base.:+
end
I'd like to do something like this, but avoid the Any
. I was thinking something like
@trait Addable{L, R, X} where {X = inferAddable(L,R)} begin
(+) :: [L, R] => X
(+) = Base.:+
end
But then I'm having trouble getting the @implement
to work out. Is this currently possible?