Add type-protocols and protocols-with-method#402
Merged
Conversation
orchard.xref/type-protocols returns the protocols a class implements - both extend/extend-type/extend-protocol and inline defrecord/deftype - by scanning the loaded protocols and testing each. orchard.xref/protocols-with-method returns the protocols declaring a method of a given name. These back the reverse-lookup and method-search variants of CIDER's protocol exploration, the counterpart to protocol-impls/who-implements.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-on to #401, backing the reverse-lookup and method-search protocol commands in CIDER.
orchard.xref/type-protocolsreturns the protocols a class implements - bothextend/extend-type/extend-protocoland inlinedefrecord/deftype(found by testing each loaded protocol's interface).orchard.xref/protocols-with-methodreturns the protocols whose:sigsdeclare a method of the given name.Both scan the loaded protocols, so only loaded code is visible - consistent with the rest of
orchard.xref.