-
Notifications
You must be signed in to change notification settings - Fork 32
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
Should OsPath be (public) newtype over OsString anyway? #165
Comments
In GitLab by @maerwald on Aug 2, 2022, 20:33 I'm not too sure either. Because although the quasiquoters are different, the So my intuition is that a newtype just for the sake of different instances, but without additional guarantees, is kinda confusing. |
In GitLab by @phadej on Aug 3, 2022, 18:39 I see. So it's "not wrong" to use That is an interesting point. E.g. if we could have a good If you agree, we can close this issue. |
In GitLab by @maerwald on Aug 3, 2022, 19:25 Well, I think OsPath being a newtype would be interesting, but there are two problems:
That's why I can't come up with a simple design that doesn't make opinionated decisions. Otherwise, a non-class approach with top-level functions seems easier. But that's not compatible with our OverloadedStrings approach (if only we could provide tags or whatnot like in python). |
In GitLab by @phadej on Aug 2, 2022, 19:27
I'm thinking this from the POV if there were "right"
IsString
type-class.Currently
osp
andosstr
quasiquoters are different, but astype OsPath = OsString
we cannot do type-directed resolution.The text was updated successfully, but these errors were encountered: