Conversation
7525c03 to
69fdaa1
Compare
| I'm pleased to announce that the Haskell type `type FilePath = String` | ||
| has a successor, which was first discussed many years ago as the [Abstract FilePath proposal (AFPP)](https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/abstract-file-path). | ||
|
|
||
| The new type shipped with the [filepath-1.4.99.0](https://hackage.haskell.org/package/filepath-1.4.99.0/candidate) package is (simplified, omitting some type aliases): |
There was a problem hiding this comment.
What's the rationale to distinguish OsString and type OsPath = OsString? Could we just define OsPath as below?
There was a problem hiding this comment.
Some parts of the filepath API deal with things that are not really filepaths, e.g. https://hackage.haskell.org/package/filepath-1.4.2.2/docs/System-FilePath.html#v:splitSearchPath
splitSearchPath :: String -> [FilePath]So we want to maintain that light distinction.
There was a problem hiding this comment.
Dunno, if it's worth it. Type synonyms may cause confusing error messages.
There was a problem hiding this comment.
I've sent this for discussion to the CLC long ago, but never got an answer.
https://groups.google.com/g/haskell-core-libraries/c/WzapcSvvfQM/m/P4xgPsy8CwAJ
After some discussions with users on IRC i decided to keep the type synonym.
There was a problem hiding this comment.
I'd certainly prefer no type synonyms, but up to you. Might be worth to elaborate on this decision in the blog post.
|
|
||
| So, you can just: | ||
|
|
||
| 1. update your dependencies lower bounds to the minimum version that supports `OsPath` |
There was a problem hiding this comment.
That's a good place to give some examples, e. g., filepath >= 1.4.99, unix >= 2.8, Win32 >= 2.14 or whatever.
There was a problem hiding this comment.
Yep, need to wait for releases to know which versions exactly.
@Bodigrim
Rendered markdown: https://github.com/hasufell/hasufell.github.io/blob/AFPP/posts/2022-06-29-fixing-haskell-filepaths.md
TODO: