Here's a small example:

function nef(weights, input_B)
    delta_B = cartesianarray(Float64, (input_B),) do j
                sum(weights[spikes_A, j]) 
              end
end

ct = code_typed(nef, (Array{Float64,2}, Int64))

println(ct)

Here's the output:

{:($(Expr(:lambda, {:weights,:input_B}, 
{{:#s2,:delta_B},{{:weights,Array{Float64,2},1},{:input_B,Int64,0},{:#s2,Any,18},{:delta_B,Any,18}},{}},
 
:(begin
        #s2 = cartesianarray(AST(:($(Expr(:lambda, {:(j::Any)}, 
{{},{{:j,Any,0}},{{:weights,Array{Float64,2},1}}}, :(begin  # 
/mnt/home/taanders/pse-hpc/benchmarks2/nengo/ex2.jl, line 3:
        return sum(getindex(weights,spikes_A,j))
    end))))),Float64,input_B::Int64)
        delta_B = #s2
        return #s2
    end))))}

This shows the first lambda arg again as :(j::Any) of type :(::).  In my 
real code, it was at least figuring out in the second lambda arg to type 
"j" as {:j,Int64,0} but in this example it doesn't even figure out that "j" 
has to be of some Unsigned type and punts back to Any ({:j, Any, 0}).

Reply via email to