Path {Abs|Rel} {Dir|File} type question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Baa
Reply | Threaded
Open this post in threaded view
|

Path {Abs|Rel} {Dir|File} type question

Baa
Hello, List!

There is a library https://hackage.haskell.org/package/path-0.6.1 of
Chris Done from FPCOMPLETE. `Path` - to be safe - can be constructed
only with parsing (with TH or directly). OK. But the `Path` has
different representation on Windows and POSIX which seems that no way
to use both on the same platform (source of path can be network peer
which has another platform). Does anyone use this library and if does
- how do you workaround this?

===
Best regards, Paul
_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Path {Abs|Rel} {Dir|File} type question

Yitzchak Gale
Hi Paul,

You wrote:
> [In the path library] the `Path` has different representation
> on Windows and POSIX which seems that no way
> to use both on the same platform

You are right, the path library does not yet support that.
This issue will fix it:

https://github.com/commercialhaskell/path/issues/82

In the meantime, use the standard filepath library, which
supports paths from other platforms.

Regards,
Yitz
_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Baa
Reply | Threaded
Open this post in threaded view
|

Re: Path {Abs|Rel} {Dir|File} type question

Baa
Hmm, OK. Thank you, Yitzchak!

IMHO it will be good to have like in Python: all kind of paths (NT,
POSIX, etc) available as well as local path (local platform
dependent)...

> Hi Paul,
>
> You wrote:
> > [In the path library] the `Path` has different representation
> > on Windows and POSIX which seems that no way
> > to use both on the same platform  
>
> You are right, the path library does not yet support that.
> This issue will fix it:
>
> https://github.com/commercialhaskell/path/issues/82
>
> In the meantime, use the standard filepath library, which
> supports paths from other platforms.
>
> Regards,
> Yitz
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Fwd: Path {Abs|Rel} {Dir|File} type question

Yitzchak Gale
You wrote:
>>> [In the path library] the `Path` has different representation
>>> on Windows and POSIX which seems that no way
>>> to use both on the same platform

> IMHO it will be good to have like in Python: all kind of paths (NT,
> POSIX, etc) available as well as local path (local platform
> dependent)...

Why like in Python? You mean like in Haskell.
The standard and popular "filepath" library in
Haskell does all that very nicely.

The "path" library you are looking at is a newer library
that wraps "filepath" and provides more type safety.
It looks very nice. I hope the issue with multiplatform
paths will soon be fixed, and then perhaps the path
library will become more widely used. In the meantime,
I suggest you use the "filepath" library.

Regards,
Yitz
_______________________________________________
Beginners mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners