-
Notifications
You must be signed in to change notification settings - Fork 157
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
Add default IsString (Text, String) #610
Comments
Not sure how to fit lazy We can put What I don't know is whether defaults are imported through qualified imports. There are also @blamario any suggestions? |
My understanding is that the use of strict lazy text is approximately evenly divided in practice, so there's no reason to prefer one over the other. My preferred choice would then be to
|
In general yes, but for literal strings I'd imagine strict
Could you please clarify this? |
Yes, any import of a module will import all the defaults it exports. Same behaviour as with class instances, except the latter are also implicitly exported. |
The thing is that people commonly import all three modules at once. This is especially true for The suggestion with |
If and when it does, the one-line fix would be to add a de-conflicting |
One can imagine a use case where having I feel, that it's better for |
A
The |
Yes, but it will break utility of
So if there are exported OTOH, if |
Also note, the extra GHC will pick the first type which satisfies all constraints, but if |
Once https://gitlab.haskell.org/ghc/ghc/-/merge_requests/11853 is merged (which is presumably in time for GHC 9.12), we should add under appropriate CPP guard
CC @blamario
The text was updated successfully, but these errors were encountered: