Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recognizable names of iterator types #39

Closed
baggepinnen opened this issue Nov 14, 2019 · 1 comment · Fixed by #71
Closed

Recognizable names of iterator types #39

baggepinnen opened this issue Nov 14, 2019 · 1 comment · Fixed by #71

Comments

@baggepinnen
Copy link

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?

@BenLauwens
Copy link
Collaborator

Hi

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

Ben

Krastanov added a commit that referenced this issue Aug 8, 2023
- more descriptive names generated symbols
- enable docstrings for `@resumable` functions
- do not delete line number nodes in `@resumable` functions

Fixes #39

Fixes #45

Initial steps needed to address #46

* better names for generated symbols

* make docstrings work with @Resumable

* do not throw away line number information

* tests for line number and docstring preservation

* readme cleanup and version bump

* relax JET tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants