-
Notifications
You must be signed in to change notification settings - Fork 8
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
Is there any way to remove/clear phrases? #17
Comments
I use a multi method internally to register phrasers. What do you mean by "deleting a phraser"? Deleting a phrase is only possible by using But you are right, there should be a way to remove phrasers. There is already |
I am referring to removing the method for a phraser, like you explain. For example: (defphraser pos-int?
[_ _]
"Please enter a positive integer.") and (defphraser pos-int?
{:via [::year]}
[_ _]
"The year has to be a positive integer.") are actually two entirely different phrasers. But in the REPL if you were to do something like this: => (defphraser pos-int?
[_ _]
"Please enter a positive integer.")
#multifn[phrase* 0x7ffa2c90]
=> (defphraser pos-int?
{:via [::year]}
[_ _]
"The year has to be a positive integer.")
#multifn[phrase* 0x7ffa2c90] The second |
Thanks for the great library, I really like the design of the user interface (defphraser specifically). I stumbled upon an odd issue that may not be common, but it caused me to scratch my head for a few moments, so I'd like to share in case anyone else runs into it. When you define a phraser with dispatch on the
:via
keyword, and then delete it and re-define the same phraser without dispatch (within the same REPL session), the dispatched version will shadow the non-dispatched version - which is what you would expect, but for REPL development it may be confusing since your current phraser is not actually working. I am not sure how to clear the phrase storage besides a REPL reset.The text was updated successfully, but these errors were encountered: