goretkin / FixArgs.jl

Other
19 stars 3 forks source link

simplify type parameter corresponding to keyword arguments #10

Closed goretkin closed 4 years ago

goretkin commented 4 years ago
julia> FixArgs.@fix +(1, _)
(::FixArgs.Fix{typeof(+),Tuple{Some{Int64},Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}}) (generic function with 1 method)

julia> FixArgs.@fix sum([1,2]; dim=1)
(::FixArgs.Fix{typeof(sum),Tuple{Some{Array{Int64,1}}},Base.Iterators.Pairs{Symbol,Int64,Tuple{Symbol},NamedTuple{(:dim,),Tuple{Int64}}}}) (generic function with 1 method)

Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}

and

Base.Iterators.Pairs{Symbol,Int64,Tuple{Symbol},NamedTuple{(:dim,),Tuple{Int64}}}}

should ust be NamedTuple{(),Tuple{}} and NamedTuple{(:dim,),Tuple{Int64}}, I hope.

goretkin commented 4 years ago

Thanks, @jw3126 !