-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert traitfns to use where-syntax #46
Comments
JuliaLang/julia#23211 is a won't fix, but only affects Julia 0.6. So, either this needs to wait for 0.7 or the syntax needs to be changed. A possibility is: @traitfn f{X; Tr{X}}(x::X) = 1
# would be
@traitfn f(x::X) where trait(Tr{X})<:Tr{X} where {X} = 1
# Multitrait
@traitfn f(x::X, y::Y) where trait(Tr2{X,Y})<:Tr2{X,Y} where {X,Y} = 1 or using the syntax overhauls proposed in #45 @traitfn f(x::X) where Tr(X)<:Tr where {X} = 1
# Multitrait
@traitfn f(x::X, y::Y) where Tr2(X,Y)<:Tr2 where {X,Y} = 1 The nice thing about this is that it clearly states that a computation on the types, e.g. |
@mauro3 - would it be possible to tag a 0.7-only version of SimpleTraits so we can start migrating LightGraphs using the new |
Yes, but I would rather wait for feature freeze to happen before spending time chasing 0.7. |
Makes sense to me :) Thanks. (Though didn't feature freeze happen on December 15?) |
No, it didn't quite yet, but should soon: https://discourse.julialang.org/t/1-0-feature-freeze-dec-15th/7209/28 |
https://discourse.julialang.org/t/1-0-feature-freeze-dec-15th/7209/34 - any way we might be able to start soon? |
I haven't forgotten this but I have not found the time yet. Sorry! Hopefully the week after next. |
@sbromberger (or @rohitvarkey ): I fixed the where-syntax issue in #51. Maybe you can give that branch a spin? |
@mauro3 working on it now. Hopefully will have results soon. |
@mauro3 things seem to be working very well with this branch. Thank you. |
@mauro3 - any chance you could tag this? We're moving ahead with sbromberger/LightGraphs.jl#848 since there are a large number of deprecations we need to fix prior to 0.7. Being able to reference it it REQUIRES would be awesome. |
Fixed all other deprecations also Update NEWS, README, CI and REQUIRE Also revert disabled IsConcrete-test
Fixed all other deprecations also Update NEWS, README, CI and REQUIRE Also revert disabled IsConcrete-test
Tagged: JuliaLang/METADATA.jl#13453 |
Perfect. Thank you :) |
Yep, but needs to wait for JuliaLang/julia#23211
The text was updated successfully, but these errors were encountered: