Abstract FilePath Proposal

Boespflug, Mathieu m at tweag.io
Sun Jun 28 14:47:59 UTC 2015


On 28 June 2015 at 16:34, Sven Panne <svenpanne at gmail.com> wrote:
> 2015-06-28 12:03 GMT+02:00 Boespflug, Mathieu <m at tweag.io>:
>>
>> why does the proposal *not* include normalization? [...]
>
>
> I think this is intentional, because otherwise we are in the IO monad for
> basically all operations. What's the normalized representation of
> "foo/bar/../baz"?

Notice that the kind of normalization I'm talking about, specified in
the link I provided, does not include this kind of normalization.
Because it requires the IO monad to perform correctly, and only on
real paths.

Here is the link again:

https://hackage.haskell.org/package/filepath-1.1.0.2/docs/System-FilePath-Posix.html#v:normalise

Full canonicalization of paths, stripping out redundant ".." and
whatnot, should certainly be done in a separate function, in IO.


More information about the ghc-devs mailing list