-
Notifications
You must be signed in to change notification settings - Fork 92
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
Reduce String/ByteString/PosixString variants #240
Comments
I do not expect another major version bump after |
Couldn't Backpack help here? |
I think no one uses that. |
Which is a bummer, because it's exactly the kind of functionality (ML-style modules and functors) that would reduce duplication 😄 It looks like Stack and some other non-Cabal build tools don't support it though, hence I guess it's ruled out for a library like |
String discussions seem to be currently quite popular, so we could try to source community opinions. |
I guess that would cascade to e.g. |
|
@hasufell then I don't think many will notice if |
How time flies... I wonder if we can start a deprecation process. Any opinions @Bodigrim @hs-viktor ? |
I’m fine to deprecate |
OsPath is ShortByteString, unix uses ByteString. As a user of both directory and unix, if I chose to use OsPath I will then need to convert it whenever I use unix. And there is not currently any easy I don't know if there is any possibility unix will be able to depend on os-string, in order to support OsPath itself. If not, unix could alternatively support ShortByteString. I realize either would mean increasing the number of variants in the short term! |
Can you be more specific?
newtype WindowsString = WindowsString ShortByteString
newtype PosixString = PosixString ShortByteString
newtype OsString = OsString
#if defined(mingw32_HOST_OS)
WindowsString
#else
PosixString
#endif So you can construct/pattern match on
Why would you need that? |
We currently have three variants of many modules. I think we should reduce these.
My idea is:
GroupEntry
/UserEntry
maybe) and use ByteString for file contents, lazy IO and other things where we don't know anything about size limits. RawFilePath should be dropped... it's not right.So, ideally... there would be only one API. String will probably have to live much longer, but it could be debated to move it to a compat package some time in the future.
@hs-viktor @Bodigrim
The text was updated successfully, but these errors were encountered: