-
Notifications
You must be signed in to change notification settings - Fork 65
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
StringParser for value classes #376
Comments
I'm open to the change, but I want to be cautious about it's implicit placement... I can think of many cases when wrappers are constructed using AnyVal like refined does, where we want to force the user to use a 'safe' constructor, and this parseAnyVal would break their compiler check... their wrapper would work, but produce unsafe results. |
I agree. What do you think about separate module |
Rather than having an With Refined it would be simple enough to provide a StringParser for all refined instances since it has a specific way to run the verifications... that's not really the case with AnyVal. There is no standard way to run the apply/build/wrap etc method, and no standard output... So I really hesitate to make a blanket implicit... I'm biased toward forcing the creator of the AnyVal to produce the string parser themselves. |
After thinking about this, I don't think we want to add this kind of support at this time. |
It would be great if these would make it to the library. I know that I shouldn't create an implicit function in
rho.bits.StringParser
, but if somebody points me to the right place I'll open a PR with thisThe text was updated successfully, but these errors were encountered: