-
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
Lexigraphic ordering #225
Comments
Please be more specific. What exactly is the type signature of |
I think it should be:
It should at least be compatible with
|
Why not just use |
In fact, given your use case of sorting directory contents, this is entirely obsolete, since you cannot have the same file twice. So |
On Sun, 4 Feb 2024, Julian Ospald wrote:
for sorting the contents of a directory
Why not just use compare (which is bytestring comparison)? That will
sort it. Afterwards you can still apply equalFilePath if you need more
precise distinction.
I see there is more specification needed. I think about something like
"compare (map toLower x) (map toLower y)", such that 'a' comes before 'B',
whereas in case-sensitive ordering 'a' comes after 'B'. First ordering
case-sensitive then filtering case-insensitive would not work in case of
'B', 'a', 'b'.
|
Additionally to
equalFilePath
we also needcompareFilePath
for sorting the contents of a directory and forPosix
we need a case-sensitive and a case-insensitive version for Linux and MacOS, respectively.The text was updated successfully, but these errors were encountered: