ResumableFunctions.jl icon indicating copy to clipboard operation
ResumableFunctions.jl copied to clipboard

Recognizable names of iterator types

Open baggepinnen opened this issue 4 years ago • 1 comments

Hi, I'm enjoying this package quite a lot! I do have one issue though, and would like to see if there might be a solution for it.

The iterable types created by a call to a @resumable function have anonymous names, e.g.,

MyPackage.var"##403"(0x00, #undef,T}

It would be great if the name var"##403" at least contained the function name as specified here

@resumable function my_fun()
...

so that one could easier navigate stack traces etc.

Better yet, if it was possible to dispatch on the generated type, so I could do something like

other_function(iterator::MyResubableFunction) = ...

Any thoughts on if this would be possible?

baggepinnen avatar Nov 14 '19 05:11 baggepinnen

Hi

Sorry for the late reply. Nice idea. I will put it on my todo list;) Kind regards

Ben

BenLauwens avatar Dec 14 '19 22:12 BenLauwens