I had been doing everything in modules, (I don't like restarting.)
After attempting to recreate it, I think the cause is aborting out of an
infinite recursion in typechecking.
I get a stack trace that looks like
^C ^CERROR: interrupt
in typeinf at inference.jl:1357
in typeinf at inference.jl:1363
in abstract_call_gf at inference.jl:697
in abstract_call at inference.jl:757
in abstract_eval_call at inference.jl:888
in abstract_eval at inference.jl:976
in abstract_eval_arg at inference.jl:848
in typeinf at inference.jl:1368
in typeinf at inference.jl:1363
in abstract_call_gf at inference.jl:697
in abstract_call at inference.jl:757
in abstract_eval_call at inference.jl:888
in abstract_eval at inference.jl:976
in abstract_eval_arg at inference.jl:848
in typeinf at inference.jl:1368
in typeinf at inference.jl:1363
in abstract_call_gf at inference.jl:697
in abstract_call at inference.jl:757
in abstract_eval_call at inference.jl:888
in abstract_eval at inference.jl:976
in abstract_eval_arg at inference.jl:848
in typeinf at inference.jl:1368
in typeinf at inference.jl:1363
in abstract_call_gf at inference.jl:697
in abstract_call at inference.jl:757
in abstract_eval_call at inference.jl:888
in abstract_eval at inference.jl:976
in abstract_eval_arg at inference.jl:848
in typeinf at inference.jl:1368
in typeinf at inference.jl:1363
in abstract_call_gf at inference.jl:697
in abstract_call at inference.jl:757
in abstract_eval_call at inference.jl:888
in abstract_eval at inference.jl:976
in abstract_eval_arg at inference.jl:848
in typeinf at inference.jl:1368
in typeinf at inference.jl:1363
in abstract_call_gf at inference.jl:697
in abstract_call at inference.jl:757
in abstract_eval_call at inference.jl:888
in abstract_eval at inference.jl:976
in abstract_eval_arg at inference.jl:848
in typeinf at inference.jl:1368
in typeinf at inference.jl:1363
and so on, and after that, the repl seems disoriented.
The underlying cause is that I have been attempting to change the type
signatures in Graphs so that the order of the parameters is consistent. I
attempt to do this by changing
vertex_index{V<:ProvidedVertexType}(v::V, g::GenericIncidenceList{V}) =
vertex_index(v)
to
vertex_index{V<:ProvidedVertexType}(v::V, g::GenericIncidenceList{V}) =
vertex_index(v)
vertex_index{V<:ProvidedVertexType}(g::GenericIncidenceList{V}, v::V) =
vertex_index(v)
@deprecate
vertex_index{V<:ProvidedVertexType}(v::V,g::GenericIncidenceList{V})
vertex_index(g,v)
and so forth, then fixing up the code that calls it. (I also needed to add
a separate method for graphs whose graph type was also the vertex type to
avoid ambiguity complaints.) I have not been able to boil down a
reasonable test case, but I suspect that this may be a bug.
unboiled code is available on my (deinst) github clone of Graphs, in the
new_interface branch. It does not crash consistently sometimes it runs
through the bellman-ford examples, sometimes it doesn't.
On Monday, June 2, 2014 11:04:26 AM UTC-4, Stefan Karpinski wrote:
>
> If you had a global variable named i it would happen.
>
> > On Jun 2, 2014, at 10:34 AM, David Einstein <[email protected]
> <javascript:>> wrote:
> >
> > Last night I got julia into a state where
> >
> > julia> typeof([i for i = 1:10])
> > Array{Any,1}
> >
> > restarting julia cured this (it went back to being an Int array).
> >
> > Does anyone have any idea what would cause this?
>