-
Notifications
You must be signed in to change notification settings - Fork 4
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
WISH: in func any-word
to preserve the found word type
#160
Comments
My first instinct was |
You don't
I didn't catch that (maybe because it's late ;), could you elaborate? |
Today it either returns the word or none, so you might do
Which is still fine for objects. For functions, even if it returns the type given, that helps for refinements, but won't tell you if something is an arg or local. Thinking about it might be used, and where you aren't using a literal arg with Once you're working inside the function, |
OK. I do not propose |
The purpose of
So what you are proposing would break the basic purpose of Eventually, your wish could be implemented as a new refinement to If the goal is to check if a given function supports a given refinement, maybe we should rather consider extending |
Though I don't see how this wish contradicts the stated goals, I don't mind |
Let's come back to the original use case: " I want to test if function f supports refinement /x" What's wrong with mezz level?
This should be reliable, and reasonably fast.
|
|
That was my initial approach until @dockimbel was so kind to implement a more optimal option :) |
Currently all slippers look the same:
So when I want to test if function
f
supports refinement/x
, I don't have a fast and reliable way of doing that, because I may use ax: ...
in the function which will be converted to a/local x
, andin
test will succeed.What I'm proposing:
So
/x == in :f /x
could then be used to be certain it's a refinement.The text was updated successfully, but these errors were encountered: