Keno / ASTInterpreter.jl

Gallium's AST interpreter as a separate package to simplify development
Other
16 stars 10 forks source link

Show location info from atsign-enter #42

Closed timholy closed 8 years ago

timholy commented 8 years ago

This causes @enter to show file & line number information. Example:

julia> @enter sync(A, C)
/home/tim/.julia/v0.5/ArrayIterationPlayground/src/core.jl:87
86  function sync(A::AllElements, B::AllElements)
87      check_sameinds(A, B)
88      _sync(storageorder(A), storageorder(B), A, B)
89  end

About to run: ArrayIterationPlayground.check_sameinds
1|debug > 
Keno commented 8 years ago

Should we always print location info?

timholy commented 8 years ago

At a minimum, it seems pretty reasonable to do that on each new function entry. When it's just stepping to a new line in the same function, would that be irritating? I'm not sure; it might not be, and it's presumably the easier approach.

Keno commented 8 years ago

I don't think it would be too distracting, since the way it ends up working in the user's terminal is that the instructions are always in the same place (at the bottom of the screen).

Keno commented 8 years ago

3636afe84eac4a90d6dc67b72c409411ff454b67. I also made the file/line bold, since it looks like part of the frame that way, and is clearly offset from the code:

screen shot 2016-04-24 at 8 36 57 pm
timholy commented 8 years ago

Thanks. I was still coming to grips with what happened where, and this is a big help.