-
Notifications
You must be signed in to change notification settings - Fork 160
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
Add ShowDeclarationsOfOperation helper #3459
Add ShowDeclarationsOfOperation helper #3459
Conversation
Thanks, this is indeed a very helpful function! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks very helpful for debugging purposes.
Concerning the manual placement: I believe the whole section "Global Variables in the Library" seems to be mislabeled - I would not have (and still don't) associate "global variables" with methods like "DeclareCategory" or "TypeOfOperation". While @DominikBernhardt has a slightly better suggestion, putting it under the header "Function Types" also feels weird.
If I were to search for this functionality, I would naturally look for a chapter that explains "Operations in GAP" (or "Categories in GAP" for the "IsCategory"), ideally in a chapter whose name makes it clear that these are internal data structures or methods usually only used by developers. Unfortunately, such a chapter does not currently exist. Lacking it, I would ask whether this method would fit into chapter 7 ("Debugging"), since that seems to be one of the primary use cases I can discern.
I agree with @markusbaumeister that the header |
Yeah, I also find the section title "Global Variables in the Library" super confusing and rather inappropriate. And there are indeed some key concepts related to these operations/filters/categories/ etc. which don't seem to be explained in that chapter (or anywhere in the reference manual that I could find now). I'll think some more about it... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code returns the following error for ShowDeclarationsOfOperation(IsOperation);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `Length' on 1 arguments
The 1st argument is 'fail' which might point to an earlier problem
at /mnt/c/gap/lib/methsel2.g:249 called from
Length( locs ) at /mnt/c/gap/lib/methwhy.g:422 called from
<function "ShowDeclarationsOfOperation">( <arguments> )
called from read-eval loop at *stdin*:2
type 'quit;' to quit to outer loop```
I also wouldn't expect it in the current place and more likely would search for it in |
@PaulaHaehndel yes, it breaks if you give it |
82aa61e
to
c008f26
Compare
Codecov Report
@@ Coverage Diff @@
## master #3459 +/- ##
=========================================
Coverage ? 85.33%
=========================================
Files ? 699
Lines ? 346482
Branches ? 0
=========================================
Hits ? 295684
Misses ? 50798
Partials ? 0
|
c008f26
to
6a4233d
Compare
When debugging issues with method installations for operations (including attributes and properties), it can be helpful to find out what all declarations of a given operation are. This helper function does just that.
6a4233d
to
402644d
Compare
@PaulaHaehndel regarding the error with |
I'll merge this now, and then provide another PR to improve the arrangement of things a bit. Thank you all for your feedback! |
When debugging issues with method installations for operations (including
attributes and properties), it can be helpful to find out what all
declarations of a given operation are. This helper function does just that.
The placement of this function in the manual could perhaps be better, I am open to suggestions, but generally feel that this could and should be improved in that whole chapter
This is a new feature and hence should be listed in the release notes.