But, to (maybe) answer the question, if you check code_lowered I believe
the :(::) will be converted to a typeassert.

On Sun, Apr 12, 2015 at 11:46 AM, Isaiah Norton <isaiah.nor...@gmail.com>
wrote:

> It would be helpful/time-saving to send the `code_typed` output as well,
> or at least the expected argument types.
>
> On Fri, Apr 10, 2015 at 5:09 PM, Todd Anderson <drtod...@comcast.net>
> wrote:
>
>>
>>
>> If you do code_typed on the following function, the :lambda Expr for the
>> function nef has an array of Symbol as its first argument.  I thought that
>> array of Symbol was the prescribed type for this part of a lambda
>> expression and that is the case with all the other top-level function
>> lambdas I've looked at.
>>
>> However, the :lambda Expr constructed for the cartesianarray call has
>> {:{j::Any}) as its first argument which contains a :(::) Expr rather than a
>> Symbol.  Moreover, if you look in the second argument to the :lambda,
>> you'll see that j has the correct type Int64 whereas the type in the first
>> argument's :(::) is incorrect.  So, is an array containing :(::) as the
>> first argument to a cartesianarray :lambda supposed to signify something or
>> is this simply a bug?
>>
>> function nef(pstc_scale, x, t, output, weights, v_A, ref_A, v_B, ref_B,
>> decoder_B, input_B, gain_B, bias_B, encoder_A, gain_A, bias_A)
>>     input_A = x .* encoder_A .* gain_A .+ bias_A
>>     v_A, ref_A, spikes_A=run_neurons(input_A, v_A, ref_A)
>>     delta_B = cartesianarray(Float64, (length(input_B),)) do j
>>                 sum(weights[spikes_A, j]) * pstc_scale
>>               end
>> end
>>
>
>

Reply via email to